In the Lonely Mountain, there are a lot of treasure well protected by dwarfs. Later, one day, the last dragon Smaug came and sensed the treasure being. As known to all, dragons are always much too greedy for treasure. So definitely, the war between dwarfs and Smaug begins.
During the war, two goblins Alice and Bob are turned into frogs by Gandalf, The Grey. In front of them, there are nnn lotus leaves in a line. In order to break the spell, they must jump from the 111-st lotus leaf to the nnn-th lotus leaf. If the frog is now on the iii-th lotus leaf instead of the nnn-th lotus leaf, it can jump to a lotus leaf in range (i,i+ai](i, i + a_i](i,i+ai].
Goblins are lack of intelligence and it's also true even after turned into frogs. So Alice and Bob will jump randomly, which means, they will separately pick an available lotus leaf in every jump uniformly at random.
Since Alice and Bob have already being playing games for decades, so they want to know the probability that they jump to the nnn-th lotus leaf with the same count of jumps.