a=System.in.readLines();99.times{i->println a.sum{it[~i]}}