#define _USE_MATH_DEFINES
#include<iostream>
#include<string>
#include<sstream>
#include<algorithm>
#include<cmath>
#include<map>
#include<set>
#include<vector>
#include<stack>
#include<queue>
#include<deque>
using namespace std;

int main() {

    int n;
    while(cin >> n && n != -1) {
        double x = 1.0;
        double y = 0.0;
        double theta = M_PI_2;
        for(int i = 1; i < n; i++) {
            x += cos(theta);
            y += sin(theta);
            theta = atan2(y, x) + M_PI_2;
        }
        printf("%.2f", x);
        cout << endl;
        printf("%.2f", y);
        cout << endl;
    }
     
    return 0;
}