#include<cstdio>
#include<cmath>
int main(){
    int n;
    for(;;){
        scanf("%d",&n);
        if(n==-1)break;
        double x=1,y=0;
        double rad=atan2(-y,-x);
        for(int i=2;i<=n;i++){
            rad-=M_PI_2;
            x+=cos(rad);
            y+=sin(rad);
            rad=atan2(-y,-x);
        }
        printf("%lf\n%lf\n",x,y);
    }
}