Binary password
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Zhomart uses binary string as a password for his computer. Now he forgot his old password and wants to get a new one, which is a binary string of length . He believes that password is strong enough if it doesn't contain two consecutive zeroes. To get a new password he generates a random binary string of length . If it is not strong he generates a random string again and so on until he finds a strong password. Find the expected number of random passwords Zhomart must generate before he finds strong one.
Input
One integer .
Output
Print the expected number as , where and are relatively prime positive integers.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 1K
Acceptance rate 41%