'use strict'
(function(stdin) { 
  var inputs = stdin.toString();
  var flines = fline.split.('\n')[0].split(' ').map(Number);
  var b = flines.index[0];
  var a = flines.index[1];
  var area = 2 * (a * b);
  var pepriphery = 2*(a + b);
  console.log(area.periphery);
}(require('fs').readFileSync('/dev/stdin', 'utf8')));