object Main {
    def main(args: Array[String]) {
        var input = io.Source.stdin.getLines().mkString("\n");
        var xs = input.split("\n").toList;
        var r = xs(0).toInt;
        var res = 3 * r * r;
        println(res)
    }
}
