In the Gaming Hall of Prime City, the Casino Master rolls n dice and wants to know the expected sum. Each die is fair with faces 1 to 6. The expected value of one die is (1+2+3+4+5+6)/6 = 3.5. By linearity of expectation, the expected sum of n dice is 3.5 * n. "Linearity of expectation is powerful," the Casino Master says. "The expected sum of n dice is simply n times the expected value of one die, regardless of independence." Given n (number of dice), compute the expected sum. Output as a decimal with one decimal place. If n is even, the result is an integer; if odd, it ends in .5. Constraints: 1 <= n <= 10^9 Input: 2 Output: 7.0 Input: 3 Output: 10.5
Constraints:
1 <= n <= 10^9
Tags:
