s = gets.chomp t = gets.chomp i = 0 ans = 0 while i <= (s.size - t.size) if s[i] == t[0] # binding.pry if s[i, t.size] == t ans += 1 i += (t.size - 2) end end i += 1 end # binding.pry puts ans