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

const double pi = 3.14159265358979;

int main(void){
	int n;
	
 	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;
	}
	
	return 0;
}