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

#define PI acos(-1)

int main() {
	int n;
	while (cin >> n) {
		if (n == -1) break;

		double dir = PI / 2.0, x = 0., y = 0.;
		for (; --n >= 0;) {
			dir -= (PI / 2.0);

			x += cos(dir);
			y += sin(dir);

			dir = PI + atan2(y, x);
		}
		printf("%.2lf\n%.2lf\n", x, y);
	}
	return 0;
}