#include<iostream>
#include<cmath>
using namespace std;
int main()
{
	int n;
	while(cin>>n,n!=-1) 
	{
		double x=0,y=0,rad=0,pi=3.14159265;
		for(int i = 0; i < n; ++i)
		{
			x+=cos(rad); y+=sin(rad);
			rad=atan2(y,x)+pi/2;
		}
		cout<<x<<endl;
		cout<<y<<endl;
	}
  return 0;
}