#include <iostream>
#include <iomanip>
#include <cmath>

using namespace std;

double x[1001], y[1001];

void init()
{
    x[0] = y[0] = 0.0;
    x[1] = 1.0;
    y[1] = 0.0;

    for (int i = 2; i < 1000; i++) {
        double d = sqrt(x[i - 1] * x[i - 1] + y[i - 1] * y[i - 1]);
        double dx = -y[i - 1] / d;
        double dy = x[i - 1] / d;

        x[i] = x[i - 1] + dx;
        y[i] = y[i - 1] + dy;
    }
}


int main()
{
    int n;

    init();
    cout << setprecision(3) << setiosflags(ios::fixed);

    while (cin >> n, n != -1) {
        cout << x[n] << '\n' << y[n] << endl;
    }

    return 0;
}