my $X = <>; my $Y = <>; my $K = <>; #to make a positive number my $pX = sqrt($X*$X); my $pY = sqrt($Y*$Y); my $remainder = ($pX+$pY) % $K; my $count = ($pX + $pY - $remainder)/$K; my $count_r; if($remainder != 0){ $count_r = 1; }else{ $count_r = 0; } my $turn; if($X == 0 && $Y > 0){ $turn = 0; }elsif($Y < 0){ $turn = 2; }else{ $turn = 1; } my $ans = $count + $count_r + $turn; print "$ans\n";