#!/usr/bin/env python3 n, m = list(map(int, input().strip().split())) print((n*m)-1)