#include <bits/stdc++.h>
using namespace std;
mt19937_64 rang(
    chrono::high_resolution_clock::now().time_since_epoch().count());
const int32_t mod = 1000000007;
const int32_t N = 3e5, M = N;
vector<long long> g[N];
long long a[N];
void solve() {
  long long i = 0, j = 0, n, m, k, flag = 0, ans = 0;
  string a, b;
  cin >> a >> b;
  n = a.size();
  m = b.size();
  vector<long long> pos;
  if (m > n)
    cout << 0;
  else {
    for (i = 0; i < n - m + 1; i++) {
      if (a.substr(i, m) == b) {
        a[i + m - 1] = '#';
        ans++;
      }
    }
    cout << ans << "\n";
  }
}
int32_t main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  srand(chrono::high_resolution_clock::now().time_since_epoch().count());
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
