use strict; use warnings; my ($xp, $yp) = split / /, <>; my $ans; my $r = sqrt($xp*$xp + $yp*$yp); if($r == int $r) { $ans = 2*(int $r) + 1; } else { $ans = 2*((int $r) + 1); } print "$ans\n"; exit;