Given a set *A* of *N* unordered 128-bit numbers. You are to compute a value of the function

where *A*_{k} is the *k*^{th} element of *A*, log_{10}*X* — the integer part of the decimal logarithm of *X*. We’ll assume that log_{10}0 = 0.

### Input

The first input line contains a number *N* ≤ 5000. In the following *N* lines there are 128-bit numbers *A*_{k} presented by sets of numbers (*a*_{1k}, *a*_{2k}, *a*_{3k}, *a*_{4k}), each of them lies in range from 0 to 2^{32}-1. The number *A*_{k} can be obtained from this set according to the formula

*A*_{k} = 2^{96}*a*_{1k} + 2^{64}*a*_{2k} + 2^{32}*a*_{3k} + *a*_{4k}.

### Output

You are to output the value of the function for the given set.

### Sample

input | output |
---|

2
0 0 0 2324
0 2332 0 0 | 44 |

**Problem Author: **Idea: Nikita Shamgunov, prepared by Nikita Shamgunov, Anton Botov

**Problem Source: **VIII Collegiate Students Urals Programming Contest. Yekaterinburg, March 11-16, 2004