#include <algorithm>
#include <map>
#include <vector>
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstring>
#include <cctype>
#include <cstdlib>
#include <cmath>
#include <string>
#include <queue>
using namespace std;

#define REP(i,n) for(int i=0; i<n; ++i)
#define IREP(it,array) for(vector<int>::iterator it=array.begin(); it!=array.end(); ++it)
#define SREP(it,array) for(vector<string>::iterator it=array.begin(); it!=array.end(); ++it)


int main()
{
  cout.setf(ios::fixed, ios::floatfield);
  cout.precision(6);

  int INF = 1000000;

  int n;
  while(cin>>n){
    if(n==-1) break;

    double x=1.0;
    double y=0.0;
    double ang=0.0;

    REP(i,n-1){
      double len = sqrt( x*x + y*y );
      double triL = len - tan(ang);
      x = cos(ang) * triL;
      y = 1/cos(ang) + sin(ang)*triL;
      ang = atan2(y,x);
    }
      cout << x << endl;
      cout << y << endl;
  }

  return 0;
}