#include #define rep(i, n) for(int i = 0; i < n; ++i) #define rrep(i, n) for(int i = n-1; i >= 0; --i) #define fi first #define se second using namespace std; using lint = long long; using uint = unsigned int; using ulint = unsigned long long; using ldouble = long double; using pii = pair; using pli = pair; using pdd = pair; using pld = pair; using v1i = vector; using v1li = vector; using v2i = vector>; using v2li = vector>; using v3i = vector>>; using v3li = vector>>; using v1b = vector; using v2b = vector>; using v3b = vector>>; using v1c = vector; using v2c = vector>; using v3c = vector>>; constexpr lint mod1 = 1e9+7; int main() { string s, t; int a = 0; cin >> s >> t; if(t.size() == 1){ rep(i, s.size()){ if(s[i] == t[0]){ a = -1; break; } } } else{ int tmp = 0; v1i v; rep(i, s.size()-t.size()+1){ bool b = 1; rep(j, t.size()){ if(s[i+j] != t[j]){ b = 0; break; } } if(b) v.push_back(i); } if(v.size() > 0){ rep(i, v.size()){ if(i == 0) ++a; else if(v[i] > v[i-1]+t.size()-1) ++a; } } } cout << a << endl; return 0; }