#include <iostream>
#include <cmath>

using namespace std;

int main(int argc, char const* argv[])
{
	double x,y;
	x = 1;y = 0;

	int n;

	while( cin >> n && n != -1 ){
		x = 1;y = 0;
		for( int i = 0;i < n;i++ ){
			double a = atan2( y, x ) + 3.14159265 / 2;
			x += cos( a );
			y += sin( a );
		}

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

	return 0;
}