#include <bits/stdc++.h>
using namespace std;

int main() {
  int n;

  while (cin >> n, ~n) {
    long double x = 1;
    long double y = 0;

    for (int i = 1; i < n; ++i) {
      long double dx = -y;
      long double dy = x;
      long double d = sqrt(static_cast<long double>(dx * dx + dy * dy));

      x += dx / d;
      y += dy / d;
    }

    cout << x << endl;
    cout << y << endl;
  }
}