#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;

int main() {
    while (true) {
        int n;
        cin >> n;
        if (n == -1) {
            break;
        }
        double coord[] = {1, 0, };
        for (int i = 0; i < n - 1; i++) {
            double angle = atan2(coord[1], coord[0]) + M_PI / 2;
            coord[0] += cos(angle);
            coord[1] += sin(angle);
        }
        printf("%.2f\n%.2f\n", coord[0], coord[1]);
    }
}