#include<iostream>
using namespace std;
int main()
{
int a,b,c,d;
while(cin>>a>>b)
cout<<2*(a+b)<<endl;
while(cin>>c>>d)
cout<<2*c+2*d<<endl;
return 0;
}