import java.lang.Math

val MOD: Int = 1000000000 + 7
val MODL: Long = MOD.toLong()

fun main(args: Array<String>)
{
    val (n, m) = readLine()!!.split(" ").map{Math.abs(it.toLong() - 2L)}
    println(n*m)
}
