import java.util.*;

public class Main {
    public static void main(String[] args){
        ABC159A();
    }
    private static void ABC159A() {
        // no comment, no error check
        final int INPUT_LINES_CNT = 1;
        final String DATA_SPLIT_SPACE = " ";

        ArrayList<String> inputLines = getStdInMultiLines(INPUT_LINES_CNT);

        if (inputLines.size() == 0) {
            System.out.println(0);
            return;
        }

        String outputStr;
        try {
            List<String> inputLineList= 
            Arrays.asList((inputLines.get(0)).split(DATA_SPLIT_SPACE));

            int evenNum = Integer.valueOf(inputLineList.get(0));
            int oddNum = Integer.valueOf(inputLineList.get(1));
            int outputNum = 0;

            if (0 <= evenNum && evenNum <= 100 && 0 <= oddNum && oddNum <= 100
                && 2 <= evenNum + oddNum) {
                    for (int i = evenNum - 1; i >= 1; i--){
                        outputNum = outputNum + i;
                    }
                    for (int i = oddNum - 1; i >= 1; i--){
                        outputNum = outputNum + i;
                    }
                    outputStr = String.valueOf(outputNum);
            }
            else {
                outputStr = "0";
            }
        }
        catch (Exception ex) {
            outputStr = "0";
        }

        System.out.println(outputStr);
        return;
    }

private static int getStdInNum() {
        String line1 = getStdInSingleLine();
        if (isNumber(line1)) {
            return Integer.parseInt(line1);
        }
        return 0;
    }

    private static ArrayList<String> getStdInMultiLines() {
        int cnt = 0; 
        int max = 0;

        Scanner cin = new Scanner(System.in);
        ArrayList<String> list = new ArrayList<String>();
        for (;cin.hasNext();) {
            list.add(cin.nextLine());
            if (cnt++ == 0) {
                max = Integer.parseInt((list.get(0)).split(" ")[0]);
            }
            else if (cnt == max + 1) {
                break;
            }
        }
        cin.close();
        return list;
    }
    private static ArrayList<String> getStdInMultiLines(int inputLinesCnt) {
        int cnt = 0; 

        Scanner cin = new Scanner(System.in);
        ArrayList<String> list = new ArrayList<String>();
        for (;cin.hasNext();) {
            list.add(cin.nextLine());
            if (++cnt == inputLinesCnt) {
                break;
            }
        }
        cin.close();
        return list;
    }

    private static String getStdInSingleLine() {
        Scanner cin = new Scanner(System.in);

        for (;cin.hasNext();) {
            cin.close();
            return cin.nextLine();
        }

        cin.close();
        return "";
    }

    private static boolean isNumber(String val) {
        try {
            Integer.parseInt(val);
            return true;
        }
        catch (NumberFormatException nfex) {
            return false;
        }
    }

} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
        ABC159A();
    }
    private static void ABC159A() {
        // no comment, no error check
        final int INPUT_LINES_CNT = 1;
        final String DATA_SPLIT_SPACE = " ";

        ArrayList<String> inputLines = getStdInMultiLines(INPUT_LINES_CNT);

        if (inputLines.size() == 0) {
            System.out.println(0);
            return;
        }

        String outputStr;
        try {
            List<String> inputLineList= 
            Arrays.asList((inputLines.get(0)).split(DATA_SPLIT_SPACE));

            int evenNum = Integer.valueOf(inputLineList.get(0));
            int oddNum = Integer.valueOf(inputLineList.get(1));
            int outputNum = 0;

            if (0 <= evenNum && evenNum <= 100 && 0 <= oddNum && oddNum <= 100
                && 2 <= evenNum + oddNum) {
                    for (int i = evenNum - 1; i >= 1; i--){
                        outputNum = outputNum + i;
                    }
                    for (int i = oddNum - 1; i >= 1; i--){
                        outputNum = outputNum + i;
                    }
                    outputStr = String.valueOf(outputNum);
            }
            else {
                outputStr = "0";
            }
        }
        catch (Exception ex) {
            outputStr = "0";
        }

        System.out.println(outputStr);
        return;
    }

private static int getStdInNum() {
        String line1 = getStdInSingleLine();
        if (isNumber(line1)) {
            return Integer.parseInt(line1);
        }
        return 0;
    }

    private static ArrayList<String> getStdInMultiLines() {
        int cnt = 0; 
        int max = 0;

        Scanner cin = new Scanner(System.in);
        ArrayList<String> list = new ArrayList<String>();
        for (;cin.hasNext();) {
            list.add(cin.nextLine());
            if (cnt++ == 0) {
                max = Integer.parseInt((list.get(0)).split(" ")[0]);
            }
            else if (cnt == max + 1) {
                break;
            }
        }
        cin.close();
        return list;
    }
    private static ArrayList<String> getStdInMultiLines(int inputLinesCnt) {
        int cnt = 0; 

        Scanner cin = new Scanner(System.in);
        ArrayList<String> list = new ArrayList<String>();
        for (;cin.hasNext();) {
            list.add(cin.nextLine());
            if (++cnt == inputLinesCnt) {
                break;
            }
        }
        cin.close();
        return list;
    }

    private static String getStdInSingleLine() {
        Scanner cin = new Scanner(System.in);

        for (;cin.hasNext();) {
            cin.close();
            return cin.nextLine();
        }

        cin.close();
        return "";
    }

    private static boolean isNumber(String val) {
        try {
            Integer.parseInt(val);
            return true;
        }
        catch (NumberFormatException nfex) {
            return false;
        }
    }

} Main public static void main(String[] args){
        ABC159A();
    } main {
        ABC159A();
    } ABC159A() ABC159A String[] args args private static void ABC159A() {
        // no comment, no error check
        final int INPUT_LINES_CNT = 1;
        final String DATA_SPLIT_SPACE = " ";

        ArrayList<String> inputLines = getStdInMultiLines(INPUT_LINES_CNT);

        if (inputLines.size() == 0) {
            System.out.println(0);
            return;
        }

        String outputStr;
        try {
            List<String> inputLineList= 
            Arrays.asList((inputLines.get(0)).split(DATA_SPLIT_SPACE));

            int evenNum = Integer.valueOf(inputLineList.get(0));
            int oddNum = Integer.valueOf(inputLineList.get(1));
            int outputNum = 0;

            if (0 <= evenNum && evenNum <= 100 && 0 <= oddNum && oddNum <= 100
                && 2 <= evenNum + oddNum) {
                    for (int i = evenNum - 1; i >= 1; i--){
                        outputNum = outputNum + i;
                    }
                    for (int i = oddNum - 1; i >= 1; i--){
                        outputNum = outputNum + i;
                    }
                    outputStr = String.valueOf(outputNum);
            }
            else {
                outputStr = "0";
            }
        }
        catch (Exception ex) {
            outputStr = "0";
        }

        System.out.println(outputStr);
        return;
    } ABC159A {
        // no comment, no error check
        final int INPUT_LINES_CNT = 1;
        final String DATA_SPLIT_SPACE = " ";

        ArrayList<String> inputLines = getStdInMultiLines(INPUT_LINES_CNT);

        if (inputLines.size() == 0) {
            System.out.println(0);
            return;
        }

        String outputStr;
        try {
            List<String> inputLineList= 
            Arrays.asList((inputLines.get(0)).split(DATA_SPLIT_SPACE));

            int evenNum = Integer.valueOf(inputLineList.get(0));
            int oddNum = Integer.valueOf(inputLineList.get(1));
            int outputNum = 0;

            if (0 <= evenNum && evenNum <= 100 && 0 <= oddNum && oddNum <= 100
                && 2 <= evenNum + oddNum) {
                    for (int i = evenNum - 1; i >= 1; i--){
                        outputNum = outputNum + i;
                    }
                    for (int i = oddNum - 1; i >= 1; i--){
                        outputNum = outputNum + i;
                    }
                    outputStr = String.valueOf(outputNum);
            }
            else {
                outputStr = "0";
            }
        }
        catch (Exception ex) {
            outputStr = "0";
        }

        System.out.println(outputStr);
        return;
    } final int INPUT_LINES_CNT = 1; INPUT_LINES_CNT 1 final String DATA_SPLIT_SPACE = " "; DATA_SPLIT_SPACE " " ArrayList<String> inputLines = getStdInMultiLines(INPUT_LINES_CNT); inputLines getStdInMultiLines(INPUT_LINES_CNT) getStdInMultiLines INPUT_LINES_CNT if (inputLines.size() == 0) {
            System.out.println(0);
            return;
        } inputLines.size() == 0 inputLines.size() inputLines.size inputLines 0 {
            System.out.println(0);
            return;
        } System.out.println(0) System.out.println System.out System System.out 0 return; String outputStr; outputStr try {
            List<String> inputLineList= 
            Arrays.asList((inputLines.get(0)).split(DATA_SPLIT_SPACE));

            int evenNum = Integer.valueOf(inputLineList.get(0));
            int oddNum = Integer.valueOf(inputLineList.get(1));
            int outputNum = 0;

            if (0 <= evenNum && evenNum <= 100 && 0 <= oddNum && oddNum <= 100
                && 2 <= evenNum + oddNum) {
                    for (int i = evenNum - 1; i >= 1; i--){
                        outputNum = outputNum + i;
                    }
                    for (int i = oddNum - 1; i >= 1; i--){
                        outputNum = outputNum + i;
                    }
                    outputStr = String.valueOf(outputNum);
            }
            else {
                outputStr = "0";
            }
        }
        catch (Exception ex) {
            outputStr = "0";
        } catch (Exception ex) {
            outputStr = "0";
        } Exception ex {
            outputStr = "0";
        } outputStr = "0" outputStr "0" {
            List<String> inputLineList= 
            Arrays.asList((inputLines.get(0)).split(DATA_SPLIT_SPACE));

            int evenNum = Integer.valueOf(inputLineList.get(0));
            int oddNum = Integer.valueOf(inputLineList.get(1));
            int outputNum = 0;

            if (0 <= evenNum && evenNum <= 100 && 0 <= oddNum && oddNum <= 100
                && 2 <= evenNum + oddNum) {
                    for (int i = evenNum - 1; i >= 1; i--){
                        outputNum = outputNum + i;
                    }
                    for (int i = oddNum - 1; i >= 1; i--){
                        outputNum = outputNum + i;
                    }
                    outputStr = String.valueOf(outputNum);
            }
            else {
                outputStr = "0";
            }
        } List<String> inputLineList= 
            Arrays.asList((inputLines.get(0)).split(DATA_SPLIT_SPACE)); inputLineList Arrays.asList((inputLines.get(0)).split(DATA_SPLIT_SPACE)) Arrays.asList Arrays (inputLines.get(0)).split(DATA_SPLIT_SPACE) (inputLines.get(0)).split (inputLines.get(0)) inputLines.get inputLines 0 DATA_SPLIT_SPACE int evenNum = Integer.valueOf(inputLineList.get(0)); evenNum Integer.valueOf(inputLineList.get(0)) Integer.valueOf Integer inputLineList.get(0) inputLineList.get inputLineList 0 int oddNum = Integer.valueOf(inputLineList.get(1)); oddNum Integer.valueOf(inputLineList.get(1)) Integer.valueOf Integer inputLineList.get(1) inputLineList.get inputLineList 1 int outputNum = 0; outputNum 0 if (0 <= evenNum && evenNum <= 100 && 0 <= oddNum && oddNum <= 100
                && 2 <= evenNum + oddNum) {
                    for (int i = evenNum - 1; i >= 1; i--){
                        outputNum = outputNum + i;
                    }
                    for (int i = oddNum - 1; i >= 1; i--){
                        outputNum = outputNum + i;
                    }
                    outputStr = String.valueOf(outputNum);
            }
            else {
                outputStr = "0";
            } 0 <= evenNum && evenNum <= 100 && 0 <= oddNum && oddNum <= 100
                && 2 <= evenNum + oddNum oddNum <= 100 0 <= oddNum 0 <= evenNum && evenNum <= 100 && 0 <= oddNum && oddNum <= 100
                && 2 <= evenNum + oddNum 0 <= evenNum 0 evenNum evenNum <= 100 evenNum 100 0 <= oddNum 0 oddNum oddNum <= 100 oddNum 100 2 <= evenNum + oddNum 2 evenNum + oddNum evenNum oddNum {
                    for (int i = evenNum - 1; i >= 1; i--){
                        outputNum = outputNum + i;
                    }
                    for (int i = oddNum - 1; i >= 1; i--){
                        outputNum = outputNum + i;
                    }
                    outputStr = String.valueOf(outputNum);
            } for (int i = evenNum - 1; i >= 1; i--){
                        outputNum = outputNum + i;
                    } int i = evenNum - 1; int i = evenNum - 1; i evenNum - 1 evenNum 1 i >= 1 i 1 i-- i-- i {
                        outputNum = outputNum + i;
                    } {
                        outputNum = outputNum + i;
                    } outputNum = outputNum + i outputNum outputNum + i outputNum i for (int i = oddNum - 1; i >= 1; i--){
                        outputNum = outputNum + i;
                    } int i = oddNum - 1; int i = oddNum - 1; i oddNum - 1 oddNum 1 i >= 1 i 1 i-- i-- i {
                        outputNum = outputNum + i;
                    } {
                        outputNum = outputNum + i;
                    } outputNum = outputNum + i outputNum outputNum + i outputNum i outputStr = String.valueOf(outputNum) outputStr String.valueOf(outputNum) String.valueOf String outputNum {
                outputStr = "0";
            } outputStr = "0" outputStr "0" System.out.println(outputStr) System.out.println System.out System System.out outputStr return; private static int getStdInNum() {
        String line1 = getStdInSingleLine();
        if (isNumber(line1)) {
            return Integer.parseInt(line1);
        }
        return 0;
    } getStdInNum {
        String line1 = getStdInSingleLine();
        if (isNumber(line1)) {
            return Integer.parseInt(line1);
        }
        return 0;
    } String line1 = getStdInSingleLine(); line1 getStdInSingleLine() getStdInSingleLine if (isNumber(line1)) {
            return Integer.parseInt(line1);
        } isNumber(line1) isNumber line1 {
            return Integer.parseInt(line1);
        } return Integer.parseInt(line1); Integer.parseInt(line1) Integer.parseInt Integer line1 return 0; 0 private static ArrayList<String> getStdInMultiLines() {
        int cnt = 0; 
        int max = 0;

        Scanner cin = new Scanner(System.in);
        ArrayList<String> list = new ArrayList<String>();
        for (;cin.hasNext();) {
            list.add(cin.nextLine());
            if (cnt++ == 0) {
                max = Integer.parseInt((list.get(0)).split(" ")[0]);
            }
            else if (cnt == max + 1) {
                break;
            }
        }
        cin.close();
        return list;
    } getStdInMultiLines {
        int cnt = 0; 
        int max = 0;

        Scanner cin = new Scanner(System.in);
        ArrayList<String> list = new ArrayList<String>();
        for (;cin.hasNext();) {
            list.add(cin.nextLine());
            if (cnt++ == 0) {
                max = Integer.parseInt((list.get(0)).split(" ")[0]);
            }
            else if (cnt == max + 1) {
                break;
            }
        }
        cin.close();
        return list;
    } int cnt = 0; cnt 0 int max = 0; max 0 Scanner cin = new Scanner(System.in); cin new Scanner(System.in) ArrayList<String> list = new ArrayList<String>(); list new ArrayList<String>() for (;cin.hasNext();) {
            list.add(cin.nextLine());
            if (cnt++ == 0) {
                max = Integer.parseInt((list.get(0)).split(" ")[0]);
            }
            else if (cnt == max + 1) {
                break;
            }
        } ; cin.hasNext() cin.hasNext cin {
            list.add(cin.nextLine());
            if (cnt++ == 0) {
                max = Integer.parseInt((list.get(0)).split(" ")[0]);
            }
            else if (cnt == max + 1) {
                break;
            }
        } {
            list.add(cin.nextLine());
            if (cnt++ == 0) {
                max = Integer.parseInt((list.get(0)).split(" ")[0]);
            }
            else if (cnt == max + 1) {
                break;
            }
        } list.add(cin.nextLine()) list.add list cin.nextLine() cin.nextLine cin if (cnt++ == 0) {
                max = Integer.parseInt((list.get(0)).split(" ")[0]);
            }
            else if (cnt == max + 1) {
                break;
            } cnt++ == 0 cnt++ cnt 0 {
                max = Integer.parseInt((list.get(0)).split(" ")[0]);
            } max = Integer.parseInt((list.get(0)).split(" ")[0]) max Integer.parseInt((list.get(0)).split(" ")[0]) Integer.parseInt Integer (list.get(0)).split(" ")[0] (list.get(0)).split(" ") (list.get(0)).split (list.get(0)) list.get list 0 " " 0 if (cnt == max + 1) {
                break;
            } cnt == max + 1 cnt max + 1 max 1 {
                break;
            } break; cin.close() cin.close cin return list; list private static ArrayList<String> getStdInMultiLines(int inputLinesCnt) {
        int cnt = 0; 

        Scanner cin = new Scanner(System.in);
        ArrayList<String> list = new ArrayList<String>();
        for (;cin.hasNext();) {
            list.add(cin.nextLine());
            if (++cnt == inputLinesCnt) {
                break;
            }
        }
        cin.close();
        return list;
    } getStdInMultiLines {
        int cnt = 0; 

        Scanner cin = new Scanner(System.in);
        ArrayList<String> list = new ArrayList<String>();
        for (;cin.hasNext();) {
            list.add(cin.nextLine());
            if (++cnt == inputLinesCnt) {
                break;
            }
        }
        cin.close();
        return list;
    } int cnt = 0; cnt 0 Scanner cin = new Scanner(System.in); cin new Scanner(System.in) ArrayList<String> list = new ArrayList<String>(); list new ArrayList<String>() for (;cin.hasNext();) {
            list.add(cin.nextLine());
            if (++cnt == inputLinesCnt) {
                break;
            }
        } ; cin.hasNext() cin.hasNext cin {
            list.add(cin.nextLine());
            if (++cnt == inputLinesCnt) {
                break;
            }
        } {
            list.add(cin.nextLine());
            if (++cnt == inputLinesCnt) {
                break;
            }
        } list.add(cin.nextLine()) list.add list cin.nextLine() cin.nextLine cin if (++cnt == inputLinesCnt) {
                break;
            } ++cnt == inputLinesCnt ++cnt cnt inputLinesCnt {
                break;
            } break; cin.close() cin.close cin return list; list int inputLinesCnt inputLinesCnt private static String getStdInSingleLine() {
        Scanner cin = new Scanner(System.in);

        for (;cin.hasNext();) {
            cin.close();
            return cin.nextLine();
        }

        cin.close();
        return "";
    } getStdInSingleLine {
        Scanner cin = new Scanner(System.in);

        for (;cin.hasNext();) {
            cin.close();
            return cin.nextLine();
        }

        cin.close();
        return "";
    } Scanner cin = new Scanner(System.in); cin new Scanner(System.in) for (;cin.hasNext();) {
            cin.close();
            return cin.nextLine();
        } ; cin.hasNext() cin.hasNext cin {
            cin.close();
            return cin.nextLine();
        } {
            cin.close();
            return cin.nextLine();
        } cin.close() cin.close cin return cin.nextLine(); cin.nextLine() cin.nextLine cin cin.close() cin.close cin return ""; "" private static boolean isNumber(String val) {
        try {
            Integer.parseInt(val);
            return true;
        }
        catch (NumberFormatException nfex) {
            return false;
        }
    } isNumber {
        try {
            Integer.parseInt(val);
            return true;
        }
        catch (NumberFormatException nfex) {
            return false;
        }
    } try {
            Integer.parseInt(val);
            return true;
        }
        catch (NumberFormatException nfex) {
            return false;
        } catch (NumberFormatException nfex) {
            return false;
        } NumberFormatException nfex {
            return false;
        } return false; false {
            Integer.parseInt(val);
            return true;
        } Integer.parseInt(val) Integer.parseInt Integer val return true; true String val val public class Main {
    public static void main(String[] args){
        ABC159A();
    }
    private static void ABC159A() {
        // no comment, no error check
        final int INPUT_LINES_CNT = 1;
        final String DATA_SPLIT_SPACE = " ";

        ArrayList<String> inputLines = getStdInMultiLines(INPUT_LINES_CNT);

        if (inputLines.size() == 0) {
            System.out.println(0);
            return;
        }

        String outputStr;
        try {
            List<String> inputLineList= 
            Arrays.asList((inputLines.get(0)).split(DATA_SPLIT_SPACE));

            int evenNum = Integer.valueOf(inputLineList.get(0));
            int oddNum = Integer.valueOf(inputLineList.get(1));
            int outputNum = 0;

            if (0 <= evenNum && evenNum <= 100 && 0 <= oddNum && oddNum <= 100
                && 2 <= evenNum + oddNum) {
                    for (int i = evenNum - 1; i >= 1; i--){
                        outputNum = outputNum + i;
                    }
                    for (int i = oddNum - 1; i >= 1; i--){
                        outputNum = outputNum + i;
                    }
                    outputStr = String.valueOf(outputNum);
            }
            else {
                outputStr = "0";
            }
        }
        catch (Exception ex) {
            outputStr = "0";
        }

        System.out.println(outputStr);
        return;
    }

private static int getStdInNum() {
        String line1 = getStdInSingleLine();
        if (isNumber(line1)) {
            return Integer.parseInt(line1);
        }
        return 0;
    }

    private static ArrayList<String> getStdInMultiLines() {
        int cnt = 0; 
        int max = 0;

        Scanner cin = new Scanner(System.in);
        ArrayList<String> list = new ArrayList<String>();
        for (;cin.hasNext();) {
            list.add(cin.nextLine());
            if (cnt++ == 0) {
                max = Integer.parseInt((list.get(0)).split(" ")[0]);
            }
            else if (cnt == max + 1) {
                break;
            }
        }
        cin.close();
        return list;
    }
    private static ArrayList<String> getStdInMultiLines(int inputLinesCnt) {
        int cnt = 0; 

        Scanner cin = new Scanner(System.in);
        ArrayList<String> list = new ArrayList<String>();
        for (;cin.hasNext();) {
            list.add(cin.nextLine());
            if (++cnt == inputLinesCnt) {
                break;
            }
        }
        cin.close();
        return list;
    }

    private static String getStdInSingleLine() {
        Scanner cin = new Scanner(System.in);

        for (;cin.hasNext();) {
            cin.close();
            return cin.nextLine();
        }

        cin.close();
        return "";
    }

    private static boolean isNumber(String val) {
        try {
            Integer.parseInt(val);
            return true;
        }
        catch (NumberFormatException nfex) {
            return false;
        }
    }

} public class Main {
    public static void main(String[] args){
        ABC159A();
    }
    private static void ABC159A() {
        // no comment, no error check
        final int INPUT_LINES_CNT = 1;
        final String DATA_SPLIT_SPACE = " ";

        ArrayList<String> inputLines = getStdInMultiLines(INPUT_LINES_CNT);

        if (inputLines.size() == 0) {
            System.out.println(0);
            return;
        }

        String outputStr;
        try {
            List<String> inputLineList= 
            Arrays.asList((inputLines.get(0)).split(DATA_SPLIT_SPACE));

            int evenNum = Integer.valueOf(inputLineList.get(0));
            int oddNum = Integer.valueOf(inputLineList.get(1));
            int outputNum = 0;

            if (0 <= evenNum && evenNum <= 100 && 0 <= oddNum && oddNum <= 100
                && 2 <= evenNum + oddNum) {
                    for (int i = evenNum - 1; i >= 1; i--){
                        outputNum = outputNum + i;
                    }
                    for (int i = oddNum - 1; i >= 1; i--){
                        outputNum = outputNum + i;
                    }
                    outputStr = String.valueOf(outputNum);
            }
            else {
                outputStr = "0";
            }
        }
        catch (Exception ex) {
            outputStr = "0";
        }

        System.out.println(outputStr);
        return;
    }

private static int getStdInNum() {
        String line1 = getStdInSingleLine();
        if (isNumber(line1)) {
            return Integer.parseInt(line1);
        }
        return 0;
    }

    private static ArrayList<String> getStdInMultiLines() {
        int cnt = 0; 
        int max = 0;

        Scanner cin = new Scanner(System.in);
        ArrayList<String> list = new ArrayList<String>();
        for (;cin.hasNext();) {
            list.add(cin.nextLine());
            if (cnt++ == 0) {
                max = Integer.parseInt((list.get(0)).split(" ")[0]);
            }
            else if (cnt == max + 1) {
                break;
            }
        }
        cin.close();
        return list;
    }
    private static ArrayList<String> getStdInMultiLines(int inputLinesCnt) {
        int cnt = 0; 

        Scanner cin = new Scanner(System.in);
        ArrayList<String> list = new ArrayList<String>();
        for (;cin.hasNext();) {
            list.add(cin.nextLine());
            if (++cnt == inputLinesCnt) {
                break;
            }
        }
        cin.close();
        return list;
    }

    private static String getStdInSingleLine() {
        Scanner cin = new Scanner(System.in);

        for (;cin.hasNext();) {
            cin.close();
            return cin.nextLine();
        }

        cin.close();
        return "";
    }

    private static boolean isNumber(String val) {
        try {
            Integer.parseInt(val);
            return true;
        }
        catch (NumberFormatException nfex) {
            return false;
        }
    }

} Main
import java.util.*;

public class Main {
    public static void main(String[] args){
        ABC159A();
    }
    private static void ABC159A() {
        // no comment, no error check
        final int INPUT_LINES_CNT = 1;
        final String DATA_SPLIT_SPACE = " ";

        ArrayList<String> inputLines = getStdInMultiLines(INPUT_LINES_CNT);

        if (inputLines.size() == 0) {
            System.out.println(0);
            return;
        }

        String outputStr;
        try {
            List<String> inputLineList= 
            Arrays.asList((inputLines.get(0)).split(DATA_SPLIT_SPACE));

            int evenNum = Integer.valueOf(inputLineList.get(0));
            int oddNum = Integer.valueOf(inputLineList.get(1));
            int outputNum = 0;

            if (0 <= evenNum && evenNum <= 100 && 0 <= oddNum && oddNum <= 100
                && 2 <= evenNum + oddNum) {
                    for (int i = evenNum - 1; i >= 1; i--){
                        outputNum = outputNum + i;
                    }
                    for (int i = oddNum - 1; i >= 1; i--){
                        outputNum = outputNum + i;
                    }
                    outputStr = String.valueOf(outputNum);
            }
            else {
                outputStr = "0";
            }
        }
        catch (Exception ex) {
            outputStr = "0";
        }

        System.out.println(outputStr);
        return;
    }

private static int getStdInNum() {
        String line1 = getStdInSingleLine();
        if (isNumber(line1)) {
            return Integer.parseInt(line1);
        }
        return 0;
    }

    private static ArrayList<String> getStdInMultiLines() {
        int cnt = 0; 
        int max = 0;

        Scanner cin = new Scanner(System.in);
        ArrayList<String> list = new ArrayList<String>();
        for (;cin.hasNext();) {
            list.add(cin.nextLine());
            if (cnt++ == 0) {
                max = Integer.parseInt((list.get(0)).split(" ")[0]);
            }
            else if (cnt == max + 1) {
                break;
            }
        }
        cin.close();
        return list;
    }
    private static ArrayList<String> getStdInMultiLines(int inputLinesCnt) {
        int cnt = 0; 

        Scanner cin = new Scanner(System.in);
        ArrayList<String> list = new ArrayList<String>();
        for (;cin.hasNext();) {
            list.add(cin.nextLine());
            if (++cnt == inputLinesCnt) {
                break;
            }
        }
        cin.close();
        return list;
    }

    private static String getStdInSingleLine() {
        Scanner cin = new Scanner(System.in);

        for (;cin.hasNext();) {
            cin.close();
            return cin.nextLine();
        }

        cin.close();
        return "";
    }

    private static boolean isNumber(String val) {
        try {
            Integer.parseInt(val);
            return true;
        }
        catch (NumberFormatException nfex) {
            return false;
        }
    }

}
