#include using namespace std; int main(){ long long N; long long a[1000] ,b[1000]; cin >> N; for(int i=0; i> a[i] >> b[i]; int maxLength = a[0] + 4*b[0]; int maxline =0; for(int i=0; i maxLength){ maxLength = a[i] + 4*b[i]; maxline = i; } } int surplus = maxLength %2; int spaceCounter = 0; for(int i=0; i