Types: n: int
Ranges: 5 ≤ n ≤ 10000
Addtl Info: Input ends with a line containing zero.