#include <iostream>
#include <iomanip>
#include <complex>
using namespace std;
#define X real()
#define Y imag()
typedef complex<double> P;

int main(){
    while(1){
        int n;
        cin >> n;
        if(n == -1) break;

        P p(0, 0), dir(1, 0);
        for(int i=0; i<n; i++){
            p += dir;
            dir = p *P(0, 1);
            dir /= abs(dir);
        }
        cout << fixed << setprecision(10);
        cout << p.X << endl << p.Y << endl;
    }
    return 0;
}

