#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
int main(){
	int n,i;
	while(cin>>n&&n!=-1){
	double x=1.0,y=0.0,l,kakudo=0.0,r;
	 for(i=1;i<n;i++){
		 l=sqrt(x*x+y*y);
		 kakudo+=atan(1/l);
		 r=sqrt(l*l+1.0);
		 x=r*cos(kakudo);
		 y=r*sin(kakudo);
		}
	 printf("%2lf\n%2lf\n",x,y);
	}
	return 0;
}