#include <bits/stdc++.h>
int main() {
  int res = 0;
  std::string google, apple;
  google.reserve(100001);
  std::cin >> google >> apple;
  int gs = google.size();
  int as = apple.size();
  for (int i = 0; i <= gs - as; i++)
    if (std::equal(apple.begin(), apple.end(), google.begin() + i)) {
      res++;
      i += as - 1;
    }
  std::cout << res << std::endl;
  return 0;
}
