#include <iostream>
#include <cmath>
#include <complex>
#include <cstdio>

using namespace std;
#define loop(i,a,b) for(int i=a; i<b; i++)
#define rep(i,b) loop(i,0,b)

int main(){
    int n;
    while(cin>>n,n!=-1){
        complex<double> p(1,0);
        rep(i,n-1) p+=p*complex<double>(0,1)/abs(p);
        printf("%.4f\n%.4f\n",p.real(),p.imag());
    }
}