import java.util.*

fun main(args: Array<String>) {
    val argList = Scanner(System.`in`)

    val r = argList.nextInt()

    val e = Dodecagon()
    println(e.execute(r))

}

class Dodecagon {
    fun execute(r: Int): Int {
        return 3 * r * r
    }
}