#include <iostream>
#include <complex>
#include <iomanip>
using namespace std;

int main(){
  int n;
  while(cin>>n&&n!=-1){
    complex<double> p(1.0,0.0),q(0.0,1.0);
    for(int i=1;i<n;++i) p+=p*q/abs(p);
    cout<<fixed<<setprecision(2)<<p.real()<<'\n'<<p.imag()<<endl;
  }
  return 0;
}