#include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <algorithm>
#include <string>
#include <bitset>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <sstream>
#include <fstream>
//#include <tuple>
#include <set>
#include <string.h>
#include <functional>

#define X first
#define Y second
#define MP make_pair
//#define MT make_tuple
#define REP(i, a, n) for(int (i) = (a); (i) < (n); ++(i))
#define FOR(i, n) REP(i, 0, n)
typedef long long ll;
using namespace std;
const int MAX = 500;

template<class T, class U>
void convert(T &t, U &u)
{
	stringstream ss;
	ss << t;
	ss >> u;
}

int main()
{
	int n;
	while ( cin >> n ){
		if ( n == -1 ) break;

		double x = 1.00000000000, y = 0.00000000000;
		double bottom = 1.0000000000;
		double tan = 1.00000000000 / bottom;
		double angle = 0.00000000000;

		--n;

		while(n > 0){
			y += 1.0000000000000 * sin( angle + ( 90.000000000000 * 3.1415926535 / 180.00000000000 ) );
			x += 1.0000000000000 * cos( angle + ( 90.000000000000 * 3.1415926535 / 180.00000000000 ) );

			angle += atan( tan );

			bottom = sqrt( (y - 0.00000000000) * (y - 0.00000000000) + (x - 0.00000000000) * (x - 0.00000000000) );
			tan = 1.000000000000 / bottom;

			--n;
		}

		printf("%0.2f\n", x);
		printf("%0.2f\n", y);

	}
	return 0;
}