import java.util.Scanner

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    // 数値で取得
    val r = sc.nextDouble()

    val d: Double = 2.toDouble()
    print(3 * Math.pow(r, d).toInt())
}