#include <iostream>
#define _USE_MATH_DEFINES
#include <math.h>

using namespace std;

void solve()
{
	int n;
	while(cin >> n, n != -1)
	{
		double x = 1;
		double y = 0;
		double angle = 90;
		while(--n)
		{
			double rad = angle * M_PI / 180;
			x += cos(rad);
			y += sin(rad);	
			double theta = atan(y / x) * 180 / M_PI;
			if(theta <= 0)
			{
				theta += 180;
			}
			angle = 90 + theta;
		}
		cout << x << endl;
		cout << y << endl;
	}
}

int main()
{
	solve();
	return(0);
}