while(0<1){var Array(a,b)=readLine split" "map(_.toInt);println(a*b-a-b)}