puts gets.split.map(&:to_i).inject(0){|sum, i| if i % 15 == 0 sum + 8 elsif i % 3 == 0 || i % 5 == 0 sum + 4 else sum + i.to_s.length end }