#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cstdio>
#include <cmath>
using namespace std;

int main()
{
	int n;
	while(cin >> n && n != -1){
		double x, y, r = 1, R = 1, rad = 0;
		if(n > 0){
			for (int i = 1; i < n; ++i)
			{
				R = sqrt(r * r + 1);
				rad += acos(r / R);
				r = R;
			}
		}
		x = R * cos(rad);
		y = R * sin(rad);
		cout << x << endl;
		cout << y << endl;
	}
}