#include<iostream>
#include<cmath>
using namespace std;
int main(){
int n;
while(cin>>n,n+1){
double l=1;
double o=0;
for(int i=1;i<n;i++){
o+=atan(1/sqrt(l));
l++;
}
l=sqrt(l);
//cout<<l<<endl;
cout<<l*cos(o)<<endl<<l*sin(o)<<endl;
}
}