#abc129e. [abc129_e]Sum Equals Xor
[abc129_e]Sum Equals Xor
Problem Statement
You are given a positive integer in base two. How many pairs of non-negative integers satisfy the following conditions?
Since there can be extremely many such pairs, print the count modulo .
What is XOR?
The XOR of integers and , , is defined as follows:
- When is written in base two, the digit in the 's place () is if either or , but not both, has in the 's place, and otherwise.
For example, . (In base two: .)
Constraints
- is given in base two, without leading zeros.
Input
Input is given from Standard Input in the following format:
Output
Print the number of pairs that satisfy the conditions, modulo .
Sample Input 1
10
Sample Output 1
5
Five pairs satisfy the conditions: and .
Sample Input 2
1111111111111111111
Sample Output 2
162261460