import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); String start = in.next(); String end = in.next(); BigInteger obj=new BigInteger(start); BigInteger obj1=new BigInteger(end); BigInteger one = new BigInteger("1"); obj = obj.subtract(one); obj = obj.multiply(obj1); obj1 = obj1.subtract(one); obj1 = obj.add(obj1); System.out.println(obj1); } }