#include #include using namespace std; using namespace atcoder; using ll = long long; using ld = long double; string S, T; int main() { cin >> S >> T; if (S.find(T) == -1) { cout << 0 << endl; return 0; } else if (T.size() == 1) { cout << -1 << endl; return 0; } int idx = 0, cnt = 0; while (idx < S.size()) { if (S.substr(idx, T.size()) == T) { cnt++; idx += T.size() - 1; } else idx++; } cout << cnt << endl; return 0; }