#include<iostream>
#include<cmath>
using namespace std;
int main(){
long n,i;
double x,y,t,pi=3.14159265358979;
while(cin>>n){
if(n==-1)break;
for(x=1,y=0,t=0,i=1;i<n;i++){
x+=cos(t+pi*0.5);y+=sin(t+pi*0.5);t=atan2(y,x);
}
cout<<x<<endl<<y<<endl;
}
return 0;
}