#include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <queue>
#include <set>
#include <map>
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <bitset>
using namespace std;


const double EPS = 1e-9;
const double PI = 3.14159265359;

int main(){
	int n;

	while(cin >> n, n != -1){
		pair<double, double> p(0, 0);
		double dir = PI/2;
		for(int i = 0; i < n; i++){
			dir -= PI/2;
			p.first += cos(dir);
			p.second += sin(dir);
			dir = atan2(-p.second, -p.first);
		}

		cout << p.first << endl;
		cout << p.second << endl;
	}

	return 0;
}