#include<iostream>
#include<string.h>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#include<set>
#include<complex>
#define ll long long int
#define ld long double
#define INF 1000000000
#define EPS 0.0000000001
#define rep(i,n) for(i=0;i<n;i++)
using namespace std;

typedef complex<double> P;

int main()
{
  int n;
  int i;

  while(1){
    cin>>n;
    if(n==-1)break;
    P p(1,0);
    rep(i,n-1){
      P t=p;
      t*=P(0,1);//90????????¢
      t=t/abs(t);
      p=p+t;
    }
    cout<<p.real()<<endl;
    cout<<p.imag()<<endl;
  }

}