#!/bin/python import sys n,m = raw_input().strip().split(' ') n,m = [long(n),long(m)] print long(n*m - 1)