Ordinal numbers are an extension of the set of nonnegative integers. For each nonnegative integer $x$, we will establish the corresponding ordinal number $f (x)$. The first few ordinal numbers can be defined as follows.
{}.{$f(0)$}$ = ${{}}.{$f(0), f(1)$}$ = ${{},{{}}}.{$f(0), f(1), \ldots , f(k - 1)$}.Next, we can similarly define ordinal numbers that don't correspond to integers. Alas, we won't need them in this problem.
You are given a string describing an ordinal number corresponding to a nonnegative integer $n$. Find $n$.
The first line contains the description of an ordinal number corresponding to a certain nonnegative integer $n$ ($0 \le n \le 15$). It consists of the characters "{", ",", and "}".
In the description of each set, each element appears exactly once. However, as a set does not change if we change the order of elements, this order can be arbitrary.
Print the integer $n$ corresponding to the given ordinal number.