#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  int l1 = s1.size();
  int l2 = s2.size();
  int st = 0, ctr = 0;
  for (int i = 0; i < l1;) {
    string s3 = s1.substr(i, l2);
    if (s3 == s2) {
      ctr++;
      i = i + l2;
    } else {
      i++;
    }
  }
  cout << ctr;
  return 0;
}
