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

static const double PI = 3.141592;

int main(){
	int n;
	while ( cin >> n && n != -1 ){
		double x = 1.0, y = 0.0;
		for ( int i = 2; i <= n; ++i ){
			double rad = atan2( y, x ) + PI / 2;
			x += cos( rad );
			y += sin( rad );
		}

		cout << setprecision( 2 ) << setiosflags( ios::fixed );
		cout << x << endl << y << endl;
	}
	return 0;
}