#include <bits/stdc++.h>
using namespace std;
using namespace placeholders;
using LL = long long;
using ULL = unsigned long long;
using VI = vector<int>;
using VVI = vector<vector<int> >;
using VS = vector<string>;
using SS = stringstream;
using PII = pair<int, int>;
using VPII = vector<pair<int, int> >;
template <typename T = int>
using VT = vector<T>;
template <typename T = int>
using VVT = vector<vector<T> >;
template <typename T = int>
using LIM = numeric_limits<T>;
template <typename T>
inline istream &operator>>(istream &s, vector<T> &v) {
  for (T &t : v) {
    s >> t;
  }
  return s;
}
template <typename T>
inline ostream &operator<<(ostream &s, const vector<T> &v) {
  for (int i = 0; i < int(v.size()); ++i) {
    s << (" " + !i) << v[i];
  }
  return s;
}
template <typename T>
inline T fromString(const string &s) {
  T res;
  istringstream iss(s);
  iss >> res;
  return res;
}
template <typename T>
inline string toString(const T &a) {
  ostringstream oss;
  oss << a;
  return oss.str();
}
template <typename T>
inline void chmin(T &a, const T &b) {
  a = std::min(a, b);
}
template <typename T>
inline void chmax(T &a, const T &b) {
  a = std::max(a, b);
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  string S, T;
  cin >> S >> T;
  VI poss;
  for (size_t p = 0; p < S.size();) {
    p = S.find(T, p);
    if (p == string::npos) {
      break;
    }
    poss.push_back(p);
    ++p;
  }
  int prev = -100, res = 0;
  for (auto &pos : poss) {
    if (!(pos <= prev && prev < pos + ((int)(T).size()))) {
      ++res;
      prev = pos + ((int)(T).size()) - 1;
    }
  }
  cout << res << endl;
  return 0;
}
