printf"%.06f\n",18.times.inject($_.to_f){|x,z|x=201204[z]==0?Math.cos(x):Math.sin(x)} while gets