#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
#include <complex>

using namespace std;

// deq notes ½Êô½É¨¯éxNgZ http://www.deqnotes.net/acmicpc/2d_geometry/

typedef complex<double> P;
#define EPS (1e-10)
#define EQ(a,b) (abs((a)-(b)) < EPS)

// àÏ (dot product) : a&#8901;b = |a||b|cosÆ
double dot(P a, P b)
{
	return (a.real() * b.real() + a.imag() * b.imag());
}

// OÏ (cross product) : a~b = |a||b|sinÆ
double cross(P a, P b)
{
	return (a.real() * b.imag() - a.imag() * b.real());
}

// 2¼üÌ¼ð»è : aÛb <=> dot(a, b) = 0
int is_orthogonal (P a, P b)
{
	return EQ( dot(a, b), 0.0 );
}

// 2¼üÌ½t»è: a//b <=> cross(a, b) = 0
int is_paralell (P a, P b)
{
	return EQ ( cross(a, b), 0.0 );
}
//	       ¨   ¨
// PÊxNg e = a/|a|
P unit_vector (P a)
{
	double len = abs(a);
	
	return a/len;
}

// xNgÌñ]
P rotate_vector (P a, double theta )
{
	P r (cos(theta), sin(theta) );

	return a*r;
}

int main()
{
//	cut here before submit 
//	freopen("testcase.th2", "r", stdin);
	string str = "";
	int n;

	while (getline (cin, str ) ){
		n = 0;
		stringstream ss(str);
		ss >> n;
		if (n == -1){
			break;
		} // end if
		P p(1.0, 0.0 );
		P o(0.0, 0.0 );

		int i;
		for (i = 0; i < n - 1; ++i){
			P po = o - p;
			P u = unit_vector (po );
			P v = rotate_vector (u, -M_PI/2.);
			p = p + v;
//			cout << '(' << p.real() << ',' << p.imag() << ')' << endl;
		} // end for
		cout << p.real() << endl;
		cout << p.imag() << endl; 
	} // end loop
		
	return 0;
}