#include using namespace std; using ll = long long; using ul = unsigned long; using ull = unsigned long long; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); string s, t; cin >> s >> t; size_t ss=s.size(),st=t.size(); int res{0}; if (ss < st) res = 0; else if (st == 1) { if (s.find(t) != string::npos) res = -1; } else { size_t pos{0}; while(pos <= ss - st) { if (s.substr(pos, st) == t) { ++res; pos += st - 1; } else ++pos; } } cout << res << "\n"; return 0; }