Hide

Problem A
Flatter Land

You may have heard of Flat Land, the $2$D place, but have you heard of Flatter Land, the $1$D place? In Flatter Land, a disease has begun ravaging the cities. To keep the citizens of Flatter Land safe, their experts recommend that they maintain at least $x$ feet of distance between people. If $n$ Flatter Land citizens are standing as close to each other as they safely can, what’s the longest distance between any two of them? You can assume that the people themselves take up no space.

Input

The first line tells you the number of people ($2 \leq n \leq 100$) and the second tells you the recommended distance between people in feet ($3 \leq x \leq 100$).

Output

You should print the farthest distance between any two people in the group assuming that the distance from one person to the next is exactly the recommended distance. You may also assume that people take up no space.

Sample Input 1 Sample Output 1
3
6
12
Sample Input 2 Sample Output 2
5
10
40

Please log in to submit a solution to this problem

Log in