#include <bits/stdc++.h>
using namespace std;
char s[100005], ss[35];
int main() {
  char *p;
  int n, ans = 0;
  scanf("%s%s", s, ss);
  p = s;
  n = strlen(ss);
  while (p != NULL && strstr(p, ss) != NULL) {
    ans++;
    p = strstr(p, ss) + n;
  }
  printf("%d", ans);
  return 0;
}
