#define _USE_MATH_DEFINES
#include <iostream>
#include <cmath>
#include <cstdio>

using namespace std;

struct point {
	double x;
	double y;
};

// n:古文書の行数
point get_treasure_point(int n) {
	point p = { 1.0, 0.0 };

	for (int i = 0; i < n - 1; i++) {
		double rad = atan2(p.y, p.x) + M_PI / 2.0;
		p.x += cos(rad);
		p.y += sin(rad);
	}
	return p;
}

int main(void) {
	int n;

	while (cin >> n) {
		if (n == -1) {
			break;
		}
		point trasure_point = get_treasure_point(n);

		printf("%f\n%f\n", trasure_point.x, trasure_point.y);
	}
}