#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
#include <cstring>
#include <cstdlib>
#include <string>
#include <cmath>
#include <queue>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
const int INF = 1<<29;
const double PI = 3.1415926535;

int main() {
  double x[1000], nx = 1, y[1000], ny = 0;
  double t = PI / 2;
  REP(i,1000) {
    nx += cos(t);
    ny += sin(t);

    x[i] = nx; y[i] = ny;
    t = atan(ny/nx) + PI / 2;
    if (nx < 0) t += PI;
    // cout << t << endl;
    // cout << nx << " " << ny << endl;
  }
  int n;
  while(cin >> n, n != -1) {
    cout << x[n-2] << endl;
    cout << y[n-2] << endl;
  }
}