#include #include using namespace std; using namespace atcoder; using ll=long long; using ld=long double; using vll=vector; using pll=pair; using mint=modint; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); ll N,T,missed=0,total=0; string S; cin>>N; for(int i=1;i<=N;++i){ cin>>T>>S; missed+=max(0LL,(ll)S.size()-(T*12)/1000); total+=S.size(); } cout<