s = gets.chomp t = gets.chomp ans = 0 # binding.pry if t.size == 1 puts s.include?(t) ? -1 : 0 exit end # binding.pry i = 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