//Treasure Hunt ?
#include<bits/stdc++.h>
using namespace std;
typedef complex<double> P;

int main(){
  int n;
  while(cin>>n){
    if(n==-1)break;
    P a;
    real(a)=1.0; imag(a)=0.0;
    for(int i=1; i<n; i++){
      P u=(a*P(0, +1))/abs(a);
      a+=u;
    }
    printf("%.8f\n%.8f\n", real(a), imag(a));
  }
  return 0;
}