function Main(input){
  input = input.split("\n");
  inputStr = input[0].split(" ");
  var r = Number.parseInt(inputStr[0]);
  //結果表示
  console.log(3 * Math.pow(r,2));
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
