#include "bits/stdc++.h"

#define REP(i,num) for(int i=0;i<(num);++i)
#define ALL(c) c.begin(),c.end()
#define LOOP(i) while(i--)
#define PRINTALL(c) for(auto& x:c){cout<<x<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=int>
T in(){T x; cin >> x; return (x);}
template<typename T=int,typename C=vector<T>>
C vecin(int N){C x(N);REP(i,N){x[i]=in<T>();}return move(x);}

void vout(){cout << endl;}
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){cout << ' ' << h;vout(forward<Tail>(t)...);}
void out(){cout << endl;}
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){cout << h;vout(forward<Tail>(t)...);}

int main(){
	//cin.tie(0);
	//ios::sync_with_stdio(false);

	const double pi = 4.0*atan(1.0);

	vector<pair<double,double>> P(1000);
	P[0] = make_pair(1.0,0);
	for(int i=1;i<1000;i++){
		double theta = atan2(-P[i-1].second,-P[i-1].first);
		theta += 0.5*pi;
		double x = cos(theta),y = sin(theta);
		P[i].first = x+P[i-1].first;
		P[i].second = y+P[i-1].second;
	}

	while(true){
		int N=in();
		if(N<0) break;
		printf("%.5lf\n%.5lf\n",P[N-1].first,-P[N-1].second);
	}
	return 0;
}
