#define _USE_MATH_DEFINES

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

struct point {
	double x,y;

	point() {
		x = y = 0;
	}
	point(double xx, double yy) {
		x = xx;
		y = yy;
	}
	point operator+(point &a) {
		point b;
		b.x = x + a.x;
		b.y = y + a.y;
		return b;
	}
};
	
int main()
{
	point p, q;
	int n;
	double x, y, s;
	int i;
	double t;

	cout<<setprecision(2);
	cout<<setiosflags(ios::fixed);
	while (cin>>n) {
		if (n == -1) break;
		p = point(1.0, 0.0);
		for (i = 0; i < n-1; i++) {
			s = atan2(p.y,p.x) + M_PI_2;
			q = point(cos(s), sin(s));
			p = p+q;
		}
		cout<<p.x<<endl;
		cout<<p.y<<endl;
	}

	return 0;
}