#P270. 练44.2 二进制转化为十进制

练44.2 二进制转化为十进制

Description

Convert a binary number to its decimal representation.

Input Format

The first line contains a positive integer nn (1n301≤n≤30), representing the length of the binary number.
The second line contains a binary number.

Output Format

An integer representing the corresponding decimal number.

Sample

5
10101
21