#include using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define ALL(v) (v).begin(), (v).end() using ll = long long; using P = pair; const int INF = 1e9; const long long LINF = 1e18; const long long MOD = 1e9 + 7; signed main() { string s, t; cin >> s; cin >> t; int n = s.size(), m = t.size(); if (t.size() == 1) { rep(i, n) { if (s[i] == t[0]) { cout << -1 << endl; return 0; } } cout << 0 << endl; return 0; } int ans = 0; rep(i, n) { if (s.substr(i, m) == t) { ans++; i += m - 2; } } cout << ans << endl; return 0; }