#include <iostream>
#include <math.h>
using namespace std;

int main() {

  double x[1001], y[1001];
  x[0] = 1.00;
  y[0] = 0.00;

  for ( long long int i = 0; i < 1000; i++ ) {

    double ang = atan2( y[i], x[i] ) + M_PI / 2;

    x[i+1] = x[i] + cos( ang );
    y[i+1] = y[i] + sin( ang );

  }

  long long int n;

  while( true ) {

    cin >> n;
    if ( n == -1 ) break;

    n--;
    cout << x[n] << endl << y[n] << endl;

  }

  return 0;

}