#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int i, j = 0, k = 0, len1, len2;
  string str1, str2;
  cin >> str1 >> str2;
  len1 = str1.size();
  len2 = str2.size();
  for (i = 0; i < len1; i++) {
    for (j = 0; j < len2; j++) {
      if (str1[i + j] != str2[j]) break;
      if (j == len2 - 1) {
        k++;
        i += len2 - 1;
      }
    }
  }
  cout << k << endl;
}
