#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cmath>
#define int long long
#define mod 1000000007
#define for0(i, n) for(int i = 0; i < (n); i++)
#define for1(i, n) for(int i = 1; i <= (n);i++)
using namespace std;
int get() { int r; cin >> r; return r; }
double x[1234], y[1234];
signed main() {
	x[1] = 1; y[1] = 0;
	for1(i, 1000) {
		double p = (double)1 / sqrt(x[i] * x[i] + y[i] * y[i]);
		x[i + 1] = x[i] - p * y[i];
		y[i + 1] = y[i] + p * x[i];
	}
	int n; while (cin >> n, n >= 0)printf("%.5f\n%.5f\n", x[n], y[n]);
}
