#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  map<long long, int> mp;
  int n;
  string s, h;
  cin >> s;
  cin >> h;
  int sl = s.length();
  int hl = h.length();
  int cnt = 0;
  for (int i = 0; i < sl; i++) {
    if (s[i] == h[0]) {
      int j, k = i + 1;
      for (j = 1; j < hl; j++, k++)
        if (s[k] != h[j]) break;
      if (j == hl) {
        cnt++;
        i += hl - 1;
      }
    }
  }
  cout << cnt << endl;
  return 0;
}
