#include using namespace std; typedef long long ll; int main(void) { int n; cin >> n; vector a(n),b(n); int l = 0; for(int i=0;i> a[i] >> b[i]; l = max(a[i]+b[i]*4,l); } int sum = 0; for(int i=0;i