CodeForces-630C. Lucky Numbers

刺骨的言语ヽ痛彻心扉 2022-08-20 09:22 256阅读 0赞

C. Lucky Numbers

time limit per test

0.5 seconds

memory limit per test

64 megabytes

input

standard input

output

standard output

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

  1. 2

output

  1. 6
  2. #include<stdio.h>
  3. #include<string.h>
  4. #include<algorithm>
  5. #include<cmath>
  6. using namespace std;
  7. long long map[100];
  8. int main()
  9. {
  10. int n;
  11. int i,j;
  12. map[0]=0;
  13. for(i=1;i<56;i++)
  14. {
  15. map[i]=map[i-1]+pow(2,i);
  16. }
  17. while(scanf("%d",&n)!=EOF)
  18. {
  19. printf("%lld\n",map[n]);
  20. }
  21. return 0;
  22. }

发表评论

表情:
评论列表 (有 0 条评论,256人围观)

还没有评论,来说两句吧...

相关阅读