#include <bits/stdc++.h>
int main() {
  char s1[100001], s2[31];
  scanf("%s", s1);
  scanf("%s", s2);
  int i, len1 = strlen(s1), len2 = strlen(s2), j, ans = 0, k;
  i = 0;
  while (i < len1) {
    if (s1[i] == s2[0]) {
      k = i;
      for (j = 0; j < len2; j++) {
        if (s1[k] != s2[j]) break;
        k = k + 1;
      }
      if (j == len2) {
        i = i + len2 - 1;
        ans = ans + 1;
      }
    }
    i = i + 1;
  }
  printf("%d\n", ans);
  return 0;
}
