Types: n: int, a: List[int]
Ranges: 1 ≤ n ≤ 1000000, 0 ≤ ai ≤ 120
Addtl Info: Input ends with a single zero line