#include <bits/stdc++.h>
using namespace std;
int main() {
  char A[100009];
  char B[40];
  cin >> A;
  cin >> B;
  int an = 0;
  for (an = 0; B[an] != '\0'; an++)
    ;
  int counter = 0;
  for (int i = 0, j, k; A[i] != '\0';) {
    j = 0;
    k = i;
    while (A[i] != '\0' and B[j] != '\0') {
      if (A[i] == B[j]) {
        i++;
        j++;
      } else
        break;
    }
    if (j == an) {
      counter++;
    } else
      i = k + 1;
  }
  cout << counter;
}
