/*
AizuOnline A0076
Treasure Hunt II
*/
#include <stdio.h>
#include <math.h>
#include <float.h>

main()
{
  int i,n;
  double angle,shahen,x,y;

  while(EOF != scanf("%d",&n) && n>0)
    {
      angle = 0.0;
      for(i=1;i<n;i++)
          angle += atan(sqrt(1/(double)i));
      shahen = sqrt(1+(double)n-1);

      x = shahen*cos(angle);
      y = shahen*sin(angle);

      printf("%.2f\n",x);
      printf("%.2f\n",y);
    }
return(0);
}