#include #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define REPLL(i, n) for (ll i = 0; i < (ll)(n); i++) using namespace std; templateinline bool chmax(T &a, const T &b){if(a < b){a = b; return 1;}return 0;} templateinline bool chmin(T &a, const T &b){if(a > b){a = b; return 1;}return 0;} typedef long long ll; // yukicoder No.1005 BOT対策 // 2020.06.21 int main(){ ios::sync_with_stdio(false); cin.tie(0); string S, T; cin >> S >> T; int NS = S.size(); int NT = T.size(); if(NT == 1){ REP(i, NS){ if(S[i] == T[0]){ cout << -1 << endl; return 0; } } cout << 0 << endl; return 0; }else{ int ans = 0; REP(i, NS-NT+1){ if(S.substr(i, NT) == T){ ans++; i += NT-2; } } cout << ans << endl; } }