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

int main(){
	int n;
	const double pi = 3.14159265358979;

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