// Learn more about F# at http://fsharp.org
open System
open System.Net.NetworkInformation

type ll=int64
let ll=int64

let flip f a b = f b a
let add x y= x+y


    
[<EntryPoint>]
let main argv =
    let [|a;b|]= stdin.ReadLine().Split(' ')|>Array.map int
    let _=printfn "%d" ( a*b-a-b+1)
    
    0 // return an integer exit code

