#include <iostream>
#include <string>
#include <vector>
#include <cmath>
using namespace std;

const double PI = atan(1.0) * 4;
double x[1001];
double y[1001];

int main() {
    x[1] = 1; y[1] = 0;
    for (int i=2; i<=10; ++i) {
        double rad = atan2(y[i-1], x[i-1]) + (PI / 2.0);
        x[i] = x[i-1] + cos(rad);
        y[i] = y[i-1] + sin(rad);
    }
    int n;
    while (cin >> n, 0 < n) {
        cout.precision(2);
        cout << fixed;
        cout << x[n] << endl << y[n] << endl;
    }
    return 0;
}