#include <iostream>
#include <cmath>
using namespace std;

int main() {
	int n;
	double x,y;
	double r,a;
	
	while(cin>>n,n+1){
		r=1;a=0;
		
		for(int i=0;i<n-1;++i){
			a+=atan2(1,r);
			r=sqrt(r*r+1);
		}
		cout<<r*cos(a)<<endl<<r*sin(a)<<endl;
	}
	
	return 0;
}