using C=System.Console;
class S{static void Main(){for(double n=int.Parse(C.ReadLine()),r,t;n-->0;C.WriteLine(r))for(r=0,t=2*int.Parse(C.ReadLine());t>0;t--)r-=(1-t%4)/--t;}}
dXNpbmcgQz1TeXN0ZW0uQ29uc29sZTsKY2xhc3MgU3tzdGF0aWMgdm9pZCBNYWluKCl7Zm9yKGRvdWJsZSBuPWludC5QYXJzZShDLlJlYWRMaW5lKCkpLHIsdDtuLS0+MDtDLldyaXRlTGluZShyKSlmb3Iocj0wLHQ9MippbnQuUGFyc2UoQy5SZWFkTGluZSgpKTt0PjA7dC0tKXItPSgxLXQlNCkvLS10O319