#include <iostream>
#include <cmath>
#include <cstdio>

using namespace std;

int main()
{
  int n;
  double x[1001], y[1001], r=0.0;
  for(int i = 0; i < 1001; i++) x[i] = y[i] = 0;

  for(int i = 1; i < 1001; i++){
    x[i] += (cos(r)+x[i-1]);
    y[i] += (sin(r)+y[i-1]);
    r = atan2(y[i], x[i])+M_PI/2.0;
  }

  while(cin>>n && n != -1){
    printf("%0.2lf\n%0.2lf\n", x[n], y[n]);
  }

  return 0;
}