const input = require('fs').readFileSync('/dev/stdin', 'utf8');
const inputs = input.split(' ').map(value => parseInt(value));
const A = inputs[0];
const P = inputs[1];
 
const pieces = A * 3 + P;
const pies = Math.floor(pieces / 2);
 
console.log(pies);