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

const double PI = acos(-1.0);

int main() {
    int n;
    double l, a;
    
    while(cin >> n && n != -1) {
        l = 1.0; a = 0;
        for(int i=0; i<n-1; i++) {
            a += atan(1/l);
            l = sqrt(l*l+1);
        }
        cout << l * cos(a) << endl << l * sin(a) << endl;
    }
}
