#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2;
  int i = 0;
  cin >> s1 >> s2;
  size_t found = s1.find(s2);
  if (found != string::npos) {
    while (found != string::npos) {
      i++;
      found = s1.find(s2, found + s2.length());
    }
    cout << i;
  } else
    cout << "0";
  return 0;
}
