#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <cstdio>
#include <complex>

using namespace std;
typedef long long ll;
#define loop(i,a,b) for(ll i=(a); i<ll(b); i++)
#define rep(i,b) loop(i,0,b)

typedef vector<int> vi;
typedef complex<double> P;

int main(){
    int n;
    while (cin >> n, n + 1){
        P p(1, 0);
        rep(i, n - 1) p += p*P(0, 1) / abs(p);
        printf("%.100f\n%.100f\n", p.real(), p.imag());
    }
}