Module Module1
    Sub Main()
        Dim tmp() = Split(Console.ReadLine())
        Dim A = CLng(tmp(0))
        Dim B = CLng(tmp(1))

        Dim ans = (A - 1) * (B - 1)
        Console.WriteLine(ans)
    End Sub
End Module