#include #define rep(i,n) for(int i=0;i P; const int INF = 1e9; const int MOD = 1000000007; vector> graph(26,vector()); vector same; int main() { string s,t; cin >> s >> t; if(t.size() == 1){ rep(i,s.size()){ if(s[i] == t[0]){ cout << -1 << endl; return 0; } } cout << 0 << endl; return 0; } int ans = 0,i = 0; int n = s.size(), m = t.size(); while(i <= n - m ){ int j = 0; while(j < m){ if(s[i+j] == t[j]){ j ++; } else{ break; } } if(j == m){ i += m - 1; ans ++; } else i ++; } cout << ans << endl; return 0; }