Description

The numbers of all offices in the new building of the Tax Office of IT City will have lucky numbers.

Lucky number is a number that consists of digits 7 and 8 only. Find the maximum number of offices in the new building of the Tax Office given that a door-plate can hold a number not longer than n digits.

Input

The only line of input contains one integer n (1 ≤ n ≤ 55) — the maximum length of a number that a door-plate can hold.

Output

Output one integer — the maximum number of offices, than can have unique lucky numbers not longer than n digits.

Examples
input
2
output
6
1位数的,7 8
2位数的,77 78 87 88
3位数的,777 778 787 788 877 878 887 888
.....
#include<stdio.h>
//#include<bits/stdc++.h>
#include<string.h>
#include<iostream>
#include<math.h>
#include<sstream>
#include<set>
#include<queue>
#include<map>
#include<vector>
#include<algorithm>
#include<limits.h>
#define inf 0x7fffffff
#define INF 0x7fffffffffffffff
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define LL long long
#define ULL unsigned long long
using namespace std;
LL powl(LL x, LL n)
{
LL pw = 1;
while (n > 0)
{
if (n & 1) // n & 1 等价于 (n % 2) == 1
pw *= x;
x *= x;
n >>= 1; // n >>= 1 等价于 n /= 2
}
return pw;
}
int main()
{
LL n;
LL num;
cin>>n;
cout<<powl(2,n+1)-2<<endl;
// printf("%.20f\n",n*powl(1.000000011,num));
return 0;
}

  

最新文章

  1. django开发个人简易Blog——数据模型
  2. make的控制函数(error,warning)
  3. 通过SEP禁用USB
  4. MySQL- 锁(3)
  5. thinkphp @代表什么
  6. -_-#【Angular】定义服务
  7. word2016怎么从第三页开始设置页码
  8. python之twisted模块安装
  9. VS2008与opencv结合使用的方法
  10. vs 2010调用matlab dll显示窗口核心代码
  11. C语言学习及应用笔记之二:C语言static关键字及其使用
  12. format 用法
  13. C#之app.config、exe.config和vshost.exe.config作用区别
  14. MVC常用筛选器Filter
  15. 2.2.10数据类型String的常量池特性
  16. Make the DbContext Ambient with UnitOfWorkScope(now named DbContextScope by mehdime)
  17. NavigateToPageAction打开新页面
  18. 获取页面所有链接的JS
  19. 50 Jquery 库
  20. 结对编程--fault,error,failure的程序设计

热门文章

  1. php中定义数组的方法
  2. JS 中的数组遍历方式效率比较
  3. linq 初步认识
  4. 算法Sedgewick第四版-第1章基础-020一按优先级计算表达式的值
  5. google的protocol buffers 对象的序列化 for java
  6. p1129 [ZJOI2007]矩阵游戏
  7. apache的Base64编解码
  8. Android wifi管理类:WifiAdmin
  9. HTML5与CSS3基础教程(第8版) PDF扫描版​
  10. DjVu转PDG的方法与步骤