#include #define rep(i,n) for(int i = 0; i < (n); i++) using namespace std; typedef long long ll; int main(){ cin.tie(0); ios::sync_with_stdio(0); string S,T; cin >> S >> T; if(T.size() == 1u) { cout << (set(S.begin(), S.end()).count(T[0]) ? -1 : 0) << endl; return 0; } int ans = 0; for(int i = 0; i < int(S.size()); i++) { if(S.substr(i, T.size()) == T) { ans++; i += T.size() - 2; } } cout << ans << endl; }