A country is made of cities and roads, and each road connects two cities. The road network of this country has the shape of a perfect binary tree.
Subin knows the height H of the road network tree. Once the height is known, the number of cities and the number of roads follow: a perfect binary tree of height H has 2H+1−1 cities and 2H+1−2 roads.
The picture below shows the case H=2.

Subin sends cars into the road network. Every car has a start city and a destination city, and it drives along roads from the start city to the destination city without visiting the same city twice. The start city and the destination city may be the same, and such a car visits only that one city.
Subin wants every city to be visited by exactly one car. Write a program that finds the smallest number of cars Subin has to send.