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

const long double pi = 3.141592653589L;

int main()
{
    int n;
    while(cin >> n, n != -1){
        complex<long double> p(1.0L);
        for(int i = 0; i < n-1; ++i){
            p = p + polar(1.0L,arg(p) + pi / 2);
        }

        cout << p.real() << endl << p.imag() << endl;
    }
}