Fortune From Folly

아직 제출이 없습니다시간 제한1초메모리 제한1024 MB

문제

Your friend Ómar's favourite video game is Striker-Count. But he has now grown tired of actually playing the game and is more interested in the lootboxes found in the game. Inside each lootbox there is an item of some level of rarity. Ómar is only interested in acquiring the rarest items in the game. When he starts the game, he chooses two numbers nn and kk, such that knk \leq n. He then opens lootboxes in the game until kk of the last nn lootboxes included an item of the highest rarity.

This activity amuses Ómar, but does not interest you in the slightest. You are more interested in the numbers: you know that each lootbox Ómar opens has probability pp of containing an item of highest rarity, independently for each lootbox. You want to find the expected number of lootboxes Ómar will open before concluding his process.

입력

The only line of the input contains the two integers nn and kk (1kn61 \le k \le n \le 6), and the real number pp (0<p10 < p \le 1 and pp has at most four decimals after the decimal point), with meanings as described above.

출력

Output the expected number of lootboxes Ómar must open, with a relative error of at most 10610^{-6}. It is guaranteed that the input is such that this expected number does not exceed 10910^9.