#include <iostream>
#include <vector>
#include <list>
#include <algorithm>
#include <string>
#include <sstream>
#include <stack>
#include <iomanip>
#include <numeric>
#include <queue>
#include <climits>
#include <set>
#include <complex>
#include <cmath>
#include <cstring>
#include <map>
using namespace std;
using ll = long long;
#define MOD 1000000007
#define INF 1LL << 59

double x[1010], y[1010];
int main()
{
    //std::ios::sync_with_stdio(false);
    //std::cin.tie(0);
    cout << fixed << setprecision(3);

    x[1] = 1.0;
    y[1] = 0.0;
    for (int i = 2; i <= 1000; ++i)
    {
        double d = sqrt(x[i - 1] * x[i - 1] + y[i - 1] * y[i - 1]);
        double dx = -y[i - 1] / d;
        double dy = x[i - 1] / d;
        x[i] = x[i - 1] + dx;
        y[i] = y[i - 1] + dy;
    }

    int n;
    while (cin >> n)
    {
        if (n == -1)
            break;

        cout << x[n] << endl;
        cout << y[n] << endl;
    }
    return 0;
}
