#include <iostream>
#include <sstream>
#include <vector>
#include <list>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <numeric>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
using namespace std;

#define PI 3.14159265358979323846
const int size = 1001;
double X[size];
double Y[size];

double getDistance( double x1, double y1, double x2, double y2 ) {
    double x = x2 - x1;
    double y = y2 - y1;
    return sqrt( x * x + y * y );
}

double getDistance( double x, double y ) {
    return getDistance( 0, 0, x, y );
}

double zero( double d ) {
    return fabs( d ) < 1e-9 ? 0.0 : d;
}

int main() {
    X[0] = 1.0;
    Y[0] = 0.0;
    for ( int i = 1; i < size; i++ ) {
        double x = X[i-1] * cos( PI / 2.0 ) - Y[i-1] * sin( PI / 2.0 );
        double y = X[i-1] * sin( PI / 2.0 ) + Y[i-1] * cos( PI / 2.0 );
        double d = zero( getDistance( x, y ) );
        X[i] = X[i-1] + zero( x ) / d;
        Y[i] = Y[i-1] + zero( y ) / d;
        // cout << X[i-1] << ", " << Y[i-1] << " => " << X[i] << ", " << Y[i] << endl;
    }
    
    int n;
    while ( cin >> n && n > 1 ) {
        printf( "%.2f\n", X[n-1] );
        printf( "%.2f\n", Y[n-1] );
    }
    return 0;
}