#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, s1;
  cin >> s >> s1;
  int count = 0;
  for (int i = 0; i < s.length();) {
    if (s1 == s.substr(i, s1.length())) {
      count++;
      i += s1.length();
    } else {
      i++;
    }
  }
  cout << count << endl;
}
