Problem I: 【循环】【入门】计算表达式的值-0

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:278 Solved:147

Description

请用while编程
问题:
读入整数k
求和S=1+2+4+8+16+……n
其中n是满足规律的且不大于k的最大整数。输出总和s

Input

整数k

Output

总和s

Sample Input Copy

10

Sample Output Copy

15

HINT

1<= k <=1000000