#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int count = 0;
  string s1, s2, s3;
  cin >> s1 >> s2;
  s3 = s2;
  int a = s1.length() / s2.length();
  for (long long i = 0; i < (a - 1); i++) s3 += s2;
  if (s1.length() < s2.length())
    cout << "0";
  else {
    int i = 0;
    while (i < s1.length()) {
      if (s1.substr(i, s2.length()) == s2) {
        count++;
        i += s2.length();
      } else
        i++;
    }
    cout << count;
  }
}
