Problem4533--猴子吃桃

4533: 猴子吃桃

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

有只猴子发现了一堆桃子,接下来的 lns="http://www.w3.org/1998/Math/MathML">n 天,它重复执行以下操作:

  • 在每一天的上午,猴子会吃掉一半数量的桃子,保证每天早上桃子的数量都是偶数,不会出现不可分的情况;
  • 在每一天的下午,它会从森林里找 lns="http://www.w3.org/1998/Math/MathML">1 只新桃子加入桃子堆。

若在第 lns="http://www.w3.org/1998/Math/MathML">n 天晚上,还剩 lns="http://www.w3.org/1998/Math/MathML">a 只桃子,请问猴子刚发现桃子的时候有多少只?

Input

  • 两个正整数 lns="http://www.w3.org/1998/Math/MathML">n 与 lns="http://www.w3.org/1998/Math/MathML">a
  • lns="http://www.w3.org/1998/Math/MathML">1a100




Output

  • 单个整数:表示桃子的初始数量。

Sample Input Copy

3 5

Sample Output Copy

26

Source/Category