require 'matrix'

def turn_right()
    Matrix[
        [0, 1],
        [-1, 0]
        ]
end

while (n = gets.to_i) > 0
    x = Vector[1, 0]
    v = Vector[-1, 0]

    (n-1).times do
        v = turn_right() * v
        x += v
        v = x
        v /= - v.r
    end

    printf("%.3f\n", x[0])
    printf("%.4f\n", x[1])
end