#include<iostream>
#include<cmath>
#include<iomanip>
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)

using namespace std;

struct Point
{
  double x,y;
  Point(double x=-1,double y=-1):x(x),y(y){}
};

double getArg(Point A,Point B,Point C)
{
  double a = sqrt(pow(B.x-C.x,2)+pow(B.y-C.y,2));
  double b = sqrt(pow(A.x-C.x,2)+pow(A.y-C.y,2));
  double c = sqrt(pow(A.x-B.x,2)+pow(A.y-B.y,2));
  return acos( (b*b+c*c-a*a)/(2*b*c) );
}

inline double toRad(double agl){ return agl*M_PI/180.0; }

int main()
{
  int n;
  while(1)
    {
      cin >> n;
      if(n == -1)break;
      Point st = Point(0,0);
      Point now;
      double arg = 180*M_PI/180.0;
      rep(i,n)
	{
	  if(i == 0)
	    {
	      now = Point(1,0);
	      continue; 
	    }


	  arg -= 90*M_PI/180.0;
	  if(arg < 0)arg += toRad(360);

	  now.x = now.x + cos(arg);
	  now.y = now.y + sin(arg);
	  Point slide = Point(now.x+10,now.y);
	  double rarg = getArg(now,st,slide);
	  arg = (now.y <= 0 ? rarg:toRad(360)-rarg);
	}
      cout << setiosflags(ios::fixed) << setprecision(2) << now.x << endl;
      cout << setiosflags(ios::fixed) << setprecision(2) << now.y << endl;
    }
  return 0;
}