eolymp
bolt
Try our new interface for solving problems
Problems

Transformations

Transformations

Consider a sequence of one bit "\textbf{0}". \textbf{N} continue to perform the following steps. At each step, bit "\textbf{0}" is replaced by two bits "\textbf{10}", and bit "\textbf{1}" two bits "\textbf{01}". After the first step of a sequence of "\textbf{0}" is a sequence of "\textbf{10}", after the second -- "\textbf{0110}", after the third -- "\textbf{10010110}", after the fourth -- "\textbf{0110100110010110}", and so on. Write a program that determines the number of neighboring bits "\textbf{00}" in sequence after the \textbf{N}-th step. \InputFile We introduce a single integer \textbf{N} (\textbf{1}  ≤  \textbf{N}\textit{ } ≤ \textbf{ 1000}). \OutputFile Display the number of neighbors "\textbf{00}" after the \textbf{N}-th step.
Time limit 1 second
Memory limit 64 MiB
Input example #1
2
Output example #1
0