F. Grid
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Input

The input contains $$$21$$$ lines, each containing $$$21$$$ characters $$$\texttt{0}$$$ or $$$\texttt{1}$$$.

Example
Input
111111101011101111111
100000100011001000001
101110101101001011101
101110101100101011101
101110101001001011101
100000100111101000001
111111101010101111111
000000000001100000000
111100101111110011101
000111010101100110101
111101101101001000011
001001000001000011000
111101110000111001011
000000001001001111100
111111100001101010000
100000100010010100111
101110100110110011100
101110101100000100010
101110101010110000100
100000101000011001001
111111101011111111100
Output
12