my ($x, $y, $z) = get.chomp.split(" "); my $ans = $y; if $x <= $y { $ans--; } if $z <= $y { $ans--; } say $ans