#include <iostream>
using namespace std;
int main(){
int h, w;
while (cin >> h >> w){
cout << (h+w)*2 <<endl;
}