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

complex<double> crd[1000];

void set(){
    crd[0] = complex<double>(1,0);
    complex<double> u(0, 1);
    for(int i = 0; i < 999; i++){
        crd[i+1] = crd[i] + crd[i]*u/abs(crd[i]);
    }
}

int main(){
    set();
    int n;
    while( scanf("%d", &n), n > 0 ){
        printf("%.2lf\n%.2lf\n", crd[n-1].real(), crd[n-1].imag());
    }
    return 0;
}