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