#include <iostream>
#include <iomanip>
#include <cassert>
#include <algorithm>
#include <functional>
#include <vector>
#include <string>
#include <cstring>
#include <stack>
#include <queue>
#include <map>
#include <bitset>
#include <sstream>
#include <istream>
#include <cmath>
#include <cstdio>

using namespace std;

#define vci vector<int>
#define vcs vector<string>
#define pb push_back
#define sz size()
#define mapii map<int, int>
#define mapci map<char, int>
#define mapsi map<string, int>
#define all(x) x.begin(), x.end()
#define minit(a, i) memset(a, i, sizeof(a));

#define for_(i, a, b) for (int i=(int)a; i<(int)b; i++)
#define for_d(i, a, b) for (int i=(int)a-1; i>=b; i--)
#define for_r(i, a, b, c) for (int i=(int)a; i<(int)b; i += c)
#define for_dr(i, a, b, c) for (int i=(int)a-1; i>=b; i -= c)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

typedef long long ll;
typedef double D;

const int iINF = 2147483647;
const ll lINF = 9223372036854775807;

template <class T> inline void dbg(T t) { cout << t << endl; }

#define PI 3.141592

struct mine {
	D x, y, d;
};

void solve(vector< mine >& path) {
	mine s;
	s.x = 1.0; s.y = 0.0; s.d = atan2(s.y, s.x)*180/PI;
	path[0] = s;
	
	for_(i, 0, 1000) {
		mine p = path[i];
		D deg = (p.d + 90.0)*PI/180.0;
		mine np;
		np.x = p.x + cos(deg);
		np.y = p.y + sin(deg);
		np.d = atan2(np.y, np.x)*180.0/PI;
		path[i+1] = np;
	}
}

int main() {
	vector< mine > path(1010);
	solve(path);
	
	int n;
	while (1) {
		cin >> n; if (n==-1) break;
		cout << path[n-1].x << endl;
		cout << path[n-1].y << endl;
	}
	
	return 0;
}