#K86502. Minimum Tournament Time

    ID: 36878 Type: Default 1000ms 256MiB

Minimum Tournament Time

Minimum Tournament Time

In a single-elimination tournament, each match eliminates one team. Therefore, for a tournament with (n) teams, you must play exactly (n - 1) matches to determine the winner. Each match lasts (d) minutes. The problem is to determine the minimum total time required to complete the tournament.

Explanation:
Given that the number of matches is (n - 1) and each match lasts (d) minutes, the total time is ((n - 1) \times d) minutes.

inputFormat

The input consists of two space-separated integers:
(n): the number of teams ((2 \leq n \leq 100))
(d): the duration of each match in minutes ((1 \leq d \leq 100))

outputFormat

Output a single integer representing the minimum number of minutes required to conclude the tournament.## sample

4 30
90