#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[100003], b[33];
  scanf("%s", a);
  scanf("%s", b);
  int la, lb, num = 0, ans = 0;
  la = strlen(a), lb = strlen(b);
  for (int i = 0; i < la; i++) {
    num = 0;
    for (int j = 0; j < lb; j++) {
      if (a[i + j] == b[j]) num++;
    }
    if (num == lb) ans++, i = i + lb - 1;
  }
  cout << ans << endl;
}
