#include <iostream>
#include <complex>
#include <sstream>
#include <string>
#include <algorithm>
#include <deque>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <vector>
#include <set>
#include <limits>
#include <cstdio>
#include <cctype>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <ctime>
using namespace std;
#define REP(i, j) for(int i = 0; i < (int)(j); ++i)
#define FOR(i, j, k) for(int i = (int)(j); i < (int)(k); ++i)
#define SORT(v) sort((v).begin(), (v).end())
#define REVERSE(v) reverse((v).begin(), (v).end())
typedef complex<double> P;
const int MAX_N = 1010;
const double PI = 3.141592653589793;

int main() {
  P ans[MAX_N];
  ans[1] = P(1.0, 0.0);
  FOR(i, 2, MAX_N) ans[i] = ans[i - 1] + (ans[i - 1] * P(0, 1) / abs(ans[i - 1]));
  int N;
  while(cin >>N && N != -1) cout <<ans[N].real() <<endl <<ans[N].imag() <<endl;
  return 0;
}