DWITE Contest

Test Case for Question #2 in DWITE 2009-2010 High School Round 5

Contest: DWITE 2009-2010 High School Round 5
Question: #2
Input File: DATA2.txt
Output File: OUT2.txt


Input

10
11
12
13
14




Output

13
17
17
7
11