function main(input) {
  const lines = input.split('\n');
  delete lines[lines.length - 1];
  lines.forEach(v => {
    console.log(fn(v));
  });
}

function fn(v) {
  return 3 * v * v
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
