#include #define rep(i,a,b) for(int i=int(a);i> S; int M; cin >> M; ll cnt = 0; rep(i,0,M){ string T; cin >> T; rep(j,0,S.size() - T.size() + 1){ cnt += S.substr(j,T.size()) == T; } } cout << cnt << endl; }