<>=~/ /; my $ans = int($` / ($' * 2)) * $'; if ($` % ($' * 2) == 0) { $ans -= $'; } print $ans