#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;

int main() {
	int n;
	while (scanf("%d", &n), ~n) {
		double x = 1, y = 0;
		rep(i, n - 1) {
			double X = ((x - y) - (x + y)) / 2, Y = ((x - y) + (x + y)) / 2;
			double d = sqrt(x*x + y*y);
			x += X / d; y += Y / d;
		}
		printf("%.7lf\n%.7lf\n", x, y);
	}
}