from math import * while 1:x=input();n=60939;exec"x=[sin,cos][n%2](x);n/=2;"*18;print'%f'%x