#include<stdio.h>
#include<math.h>
int main(){
	int a;
	double PI=3.14159265359;
	while(scanf("%d",&a),~a){
		double x=1.0;
		double y=0.0;
		double r=PI/2;
		for(int i=0;i<a-1;i++){
			y+=sin(r);
			x+=cos(r);
			r=atan(y/x);
			if(x<0)r=r+PI;
			r+=PI/2;
		}
		printf("%.2lf\n%.2lf\n",x,y);
	}
}