#include <bits/stdc++.h> using namespace std ; int main(){ int i=1; int n; cin>>n; int m; int sum=0; while(i<=n){ int x,y,p; cin>>x; cin>>y; cin>>p; m=((x+y)/50)*2+p*1.5; sum+=m; i++; } cout<<m+1; return 0; }