#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
//#include<algorithm>
#include<cmath>
#include<string>
using namespace std;
int main() {
	int n, i;
	while (cin>>n,n!=-1) {
		double x = 1.0, y = 0.0;
		for (int i = 1; i < n;i++) {
			double d = sqrt(x*x + y*y);
			double dx = -y / d, dy = x / d;
			x += dx, y += dy;
		}
		cout << x << endl << y << endl;
	}
	return 0;
}