#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>

using namespace std;
typedef long long LL;
static const double EPS = 1e-9;

#define FOR(i,k,n) for (int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n) 

int main(void){
  int n;
  while(cin>>n){
    if(n==-1) break;
    double x = 1, y = 0;
    for(int i=1; i<n; i++){
      double theta = atan2(y,x) + M_PI/2;
      x += cos(theta);
      y += sin(theta);
    }
    printf("%.2f\n%.2f\n",x,y);
  }
  return 0;
}