1600 函数序列和


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 32M

Problem types
Allowed languages
C, C++, Java, Python

Description

这是一个数学问题。已知F(3^x) = xlog2(3)。求: F(2^1)+F(2^2)+F(2^3)+…+F(2^n)的和。

Input

输入含有多个整数n(n<1000),表示函数序列和的长度。若n为0,则输入结束。

Output

对于每个n,输出函数序列的和,每个结果占一行。

Sample

Input

5  3  0

Output

15
6

Hint

函数序列的和总是整数


Source: qianneng


Comments

There are no comments at the moment.