#include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;
int main(){


  int a;
  double x,y,l=1,r,b,c;

  while(1){
    
    cin >>a;
    
    if(a == -1)break;
    
    r=0;
    
    for(int i=0; i < a-1 ; i++){
      
      r+=((double)90/(1+l));
      b=1+l*l;
      l=sqrt(b);
      
    }

    c=r*((double)M_PI/180);

    x=l*cos(c);
    y=l*sin(c);

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

  }

  return 0;

}