(while 1(prn(apply +(map #(.bitCount(bigint%))(.split(read-line)"\\.")))))