const input = require('fs').readFileSync('/dev/stdin', 'utf8');
const [A, P] = input.split(' ').map(value => Number(value));

const pieces = A * 3 + P;
const pies = Math.floor(pieces / 2);

console.log(pies);