#53726: 解答


s410229@student.cysh.cy.edu.tw (大香蕉)


#include <iostream>

using namespace std;

int main()
{
   int n,m,mk,nk;
   while(cin>>n>>m){
       mk=(n*(m*3))+(n*2)+m;
       cout<<mk<<endl;
   }
}