"use strict";
const input = require("fs").readFileSync("/dev/stdin", "utf8");
//const inputs = input.trim().split("\n").slice(1);

const get = (inputs) => {
  const r = +inputs;
  return 3 * r * r;
}

console.log( get(input) );