1 2 3 4 5 6 7 8 9 10 11
n = 0 i = 11 k = gets.to_i while i > 0 if k[i] + k[i-1] + k[i-2] == 0 n += 1 end i -= 3 end puts n