 #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 #include<stack>
 #include<queue>
 #include<deque>
 #include<functional>
 #include<utility>
 
 using namespace std;
 
 const double PI=3.1415927;
 
 int main()
 {
   double arr[1000+5][2];
   double alpha=0;
   double x,y;
   x=y=0;
   double unit=1;
   for(int i=0;i<1005;i++)
   {
     arr[i][0]=x+unit*cos(alpha);
     arr[i][1]=y+unit*sin(alpha);
     double change=atan2(arr[i][1],arr[i][0]);
     //cout<<arr[i][0]<<" "<<arr[i][1]<<endl;
     //cout<<change<<endl;
     alpha=change+PI/2;
     x=arr[i][0];
     y=arr[i][1];
   }
   int N;
   while(cin>>N&&(N!=-1))
   {
     printf("%.2lf\n%.2lf\n",arr[N-1][0],arr[N-1][1]);                   
   }
   //while(1);
   return 0; 
 }

 
  