#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2, temp;
  cin >> s1 >> s2;
  int i, count = 0;
  for (i = 0; i < s1.size(); i++) {
    if (s1[i] == s2[0]) {
      temp = s1.substr(i, s2.size());
      if (temp == s2) {
        count++;
        i += s2.size() - 1;
      }
    }
  }
  cout << count << endl;
  return 0;
}
