#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i;
  string a, b;
  cin >> a >> b;
  int x = b.size();
  int y = a.size();
  int cnt = 0;
  if (y < x) {
    cout << "0" << endl;
    return 0;
  } else {
    for (i = 0; i <= y - x;) {
      if (a.substr(i, x) == b) {
        cnt++;
        i += x;
      } else {
        i++;
      }
    }
    cout << cnt << endl;
  }
  return 0;
}
