import std.stdio;
import std.string, std.conv;
import std.math;

void main() {
  for(int N; N = readln().chomp().to!int(), N != -1;) {
    real x = 1, y = 0;

    foreach(i; 0 .. N - 1) {
      real r = hypot(x, y);
      real theta = atan(y / x);
      if(x < 0) theta += PI;
      theta += PI / 2;
      x += cos(theta);
      y += sin(theta);
      // writefln("%f %f %f", theta, x, y);
    }
    writeln(x);
    writeln(y);
  }
}