CF526B Om Nom and Dark Park

Description

Om Nom is the main character of a game "Cut the Rope". He is a bright little monster who likes visiting friends living at the other side of the park. However the dark old parks can scare even somebody as fearless as Om Nom, so he asks you to help him. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF526B/131af3f0d0c50854dd04093b7cc403fcf25a1e8b.png)The park consists of $ 2^{n+1}-1 $ squares connected by roads so that the scheme of the park is a full binary tree of depth $ n $ . More formally, the entrance to the park is located at the square $ 1 $ . The exits out of the park are located at squares $ 2^{n},2^{n}+1,...,2^{n+1}-1 $ and these exits lead straight to the Om Nom friends' houses. From each square $ i $ ( $ 2

Input Format

The first line contains integer $ n $ ( $ 1

Output Format

Print the minimum number of street lights that we should add to the roads of the park to make Om Nom feel safe.

Explanation/Hint

Picture for the sample test. Green color denotes the additional street lights. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF526B/a991902237b78dc527346d24d4ba436bdc2cc2af.png)