#pragma GCC optimize("Ofast") #include #define rep(i,n) for(int i=0;i>x[i]; #define ft first #define sc second #define pb push_back #define lb lower_bound #define ub upper_bound #define all(v) (v).begin(),(v).end() #define mod 1000000007 #define FS fixed< using V=vector; using Graph = vector>; using P=pair; typedef unsigned long long ull; typedef long double ldouble; template inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } template inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } const ll INF=1e18; const ull B=1000000007;//ハッシュの基数 //aはbに含まれているか? int contain(string a,string b){ int res=0; int al=a.length(),bl=b.length(); if(al>bl) return res; //Bのal乗を計算 ull t=1; for(int i=0;i>s; int m; cin>>m; ll ans=0; while(m--){ string c; cin>>c; ans=ans+contain(c,s); } cout<