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

#define PI (atan(1.0)*4.0)

int main(){
	int n;
	while( cin >> n, n!=-1 ){
		double x = 1.0, y = 0.0;
		double theta = PI/2.0;
		for( int i=1; i<n; i++ ){
			x += cos(theta);
			y += sin(theta);
			theta = PI/2.0 + atan2( y, x );
		}
		cout << x << endl;
		cout << y << endl;
	}
	return 0;
}