Dano je pet kutija loptica

i

tako da svaka sadrži točno jednu lopticu. Dozvoljene su sljedeće operacije:

Najveći broj loptica koji je moguće postići u kutiji

gornjim operacijama možemo zapisati u obliku

. Odredi

.
We're given five boxes

and

such that each of them contains exactly one ball. The following operations are allowed:

The largest obtainable number of balls in

using the operations above can be written as

. Determine

.
[lang=hr]
%0
Dano je pet kutija loptica \(K_1, K_2, K_3, K_4\) i \(K_5\) tako da svaka sadrži točno jednu lopticu. Dozvoljene su sljedeće operacije:
\begin{itemize}
\item Biranje jedne neprazne kutije \(K_j\) (\(1 \leq j \leq 4\)), uzimanje jedne loptice iz odabrane kutije i stavljanje dvije loptice u kutiju \(K_{j+1}\);
\item Biranje jedne neprazne kutije \(K_j\) (\(1 \leq j \leq 3\)), uzimanje jedne loptice iz odabrane kutije i zamjena sadržaja kutija \(K_{j+1}\) i \(K_{j+2}\).
\end{itemize}
Najveći broj loptica koji je moguće postići u kutiji \(K_5\) gornjim operacijama možemo zapisati u obliku \(2^n\). Odredi \(n\).\\
[/lang]
[lang=en]
We're given five boxes \(K_1, K_2, K_3, K_4\) and \(K_5\) such that each of them contains exactly one ball. The following operations are allowed:
\begin{itemize}
\item Choosing a non-empty box \(K_j\) (\(1 \leq j \leq 4\)), removing one ball from the selected box and adding two balls to \(K_{j+1}\);
\item Choosing a non-empty box \(K_j\) (\(1 \leq j \leq 3\)), removing one ball from the selected box and swapping the contents of the boxes \(K_{j+1}\) and \(K_{j+2}\).
\end{itemize}
The largest obtainable number of balls in \(K_5\) using the operations above can be written as \(2^n\). Determine \(n\).
[/lang]