
#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdio>
using namespace std;

#define sq(x) ((x)*(x))

int main() {
  
  int n;
  while(cin >> n && (n != -1)) {
    long double xl = 1.0, r, x, y;
    long double th = 0.0;
    n--;
    while(n--) {
      r = sqrt(sq(xl)+1);
      th += acos(xl/r);
      x = r*cos(th), y = r*sin(th);
      xl = r;
    }
    
    
    printf("%Lf\n%Lf\n", x, y);
  }
  
  return 0;
}