from math import* while 1:n=60939;x=input();exec'x=sin(x+n%2*pi/2);n/=2;'*18;print'%f'%x