#include <bits/stdc++.h>
using namespace std;
int main() {
  char ai[1000000], s[10000];
  scanf("%s%s", ai, s);
  int l1 = strlen(ai);
  int l2 = strlen(s);
  int cnt = 0;
  for (int i = 0; i < l1; i++) {
    int flag = 0;
    for (int j = 0; j < l2; j++) {
      if (i + j > l1) {
        flag = 1;
        break;
      }
      if (ai[i + j] != s[j]) {
        flag = 1;
        break;
      }
    }
    if (flag == 0) {
      ai[i + l2 - 1] = '#';
      cnt++;
    }
  }
  cout << cnt << "\n";
  return 0;
}
