#include <bits/stdc++.h>
using namespace std;

#define FOR(i,l,r) for(int i = (int) (l);i < (int) (r);i++)
template<typename T> bool chmax(T& a,const T& b){ return a < b ? (a = b,true) : false; }
template<typename T> bool chmin(T& a,const T& b){ return b < a ? (a = b,true) : false; }
typedef long long ll;

int N;
const double PI = acos(-1.0);

int main()
{
	while(scanf("%d",&N),N != -1){
		double rad = 0.0,dist = 1.0;
		FOR(i,1,N){
			double x = sqrt(1 + dist * dist);
			double d = acos(dist / x);
			rad += d;
			dist = x;
		}
		printf("%.10f\n%.10f\n",cos(rad) * dist,sin(rad) * dist);
	}

	return 0;
}