// 2014/05/28 Tazoe

#include <iostream>
#include <cmath>
using namespace std;

int main()
{
	double P[1001][2];

	P[1][0] = 1.0;
	P[1][1] = 0.0;

	for(int i=2; i<=1000; i++){
		double x = -P[i-1][1];
		double y = P[i-1][0];

		double L = sqrt(x*x+y*y);

		P[i][0] = P[i-1][0]+x/L;
		P[i][1] = P[i-1][1]+y/L;
	}

	while(true){
		int n;
		cin >> n;

		if(n==-1)
			break;

		cout << P[n][0] << endl;
		cout << P[n][1] << endl;
	}

	return 0;
}