Python 2.xでCodeEvalのNumber of Ones

input

10
22
56

output

2
3
3