#include<iostream>
#include<iomanip>
#include<cmath>

int main()
{
	int n;
	while( std::cin >> n )
	{
		double x = 1.0, y = 0.0;
		
		for( int i = 0; i != n - 1; ++i )
		{
			double t = sqrt( x * x + y * y );
			double vx = -y / t, vy = x / t;
			x += vx;
			y += vy;
		}

		std::cout << std::fixed << std::setprecision( 2 );
		std::cout << x << std::endl;
		std::cout << y << std::endl;
	}

	return 0;
}