#include <iostream>
#include <string>
#include <cmath>
#define PI 6*asin(0.5)
using namespace std;

int main(){
  int i,j,n;
  double x,y,na,ka;
  while(1){
    cin >> n;
    if(n == -1) break;

    x = 1.0;
    y = 0.0;
    ka = 0.0;
    na = 0.0;
    for(i=1;i<n;i++){
      na = sqrt(pow(na,2) + 1.0);
      ka += PI - (PI/2 + acos(1.0/na));

      x = x + cos(ka);
      y = y + sin(ka);
    }

    printf("%.2f\n%.2f\n",x,y);

  }
  return 0;
 }