using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ProblemSolver
{
    class Solution
    {
        static char[] splitors = { ' ' };

        /* Input data here */

        static void Input()
        {
        }

        static void Search()
        {
            long n, m;
            string[] str = Console.ReadLine().Split(splitors);
            n = long.Parse(str[0]);
            m = long.Parse(str[1]);            
            long ret = n * m - 1;
            Console.WriteLine(ret);
        }

        static void Main(string[] args)
        {
            Input();
            Search();
        }
    }
}