CF388D Fox and Perfect Sets

Description

Fox Ciel studies number theory. She thinks a non-empty set $ S $ contains non-negative integers is perfect if and only if for any ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF388D/c903e14df0afa987e9cf41a6200a241f6b8b2cd2.png) ( $ a $ can be equal to $ b $ ), ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF388D/7498aa246f7bcda4dd31870c3686217d9c6cbaf1.png). Where operation $ xor $ means exclusive or operation (http://en.wikipedia.org/wiki/Exclusive\_or). Please calculate the number of perfect sets consisting of integers not greater than $ k $ . The answer can be very large, so print it modulo $ 1000000007 $ $ (10^{9}+7) $ .

Input Format

N/A

Output Format

N/A

Explanation/Hint

In example 1, there are 2 such sets: {0} and {0, 1}. Note that {1} is not a perfect set since 1 xor 1 = 0 and {1} doesn't contain zero. In example 4, there are 6 such sets: {0}, {0, 1}, {0, 2}, {0, 3}, {0, 4} and {0, 1, 2, 3}.