import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);

int odd = sc.nextInt();
int even = sc.nextInt();
  int numodd = nCombination(odd);
  int numeven = nCombination(even);
System.out.println(numodd + numeven);
}
  
  private static int nCombination(int count) {
        int num = 0;
        for (int i = 0; i < count - 1; i++) {
            for (int j = i + 1; j < count; j++) {
                num++;
            }
        }
    return num;
    }
  
} import java.util.*; util.* java public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);

int odd = sc.nextInt();
int even = sc.nextInt();
  int numodd = nCombination(odd);
  int numeven = nCombination(even);
System.out.println(numodd + numeven);
}
  
  private static int nCombination(int count) {
        int num = 0;
        for (int i = 0; i < count - 1; i++) {
            for (int j = i + 1; j < count; j++) {
                num++;
            }
        }
    return num;
    }
  
} Main public static void main(String[] args){
Scanner sc = new Scanner(System.in);

int odd = sc.nextInt();
int even = sc.nextInt();
  int numodd = nCombination(odd);
  int numeven = nCombination(even);
System.out.println(numodd + numeven);
} main {
Scanner sc = new Scanner(System.in);

int odd = sc.nextInt();
int even = sc.nextInt();
  int numodd = nCombination(odd);
  int numeven = nCombination(even);
System.out.println(numodd + numeven);
} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int odd = sc.nextInt(); odd sc.nextInt() sc.nextInt sc int even = sc.nextInt(); even sc.nextInt() sc.nextInt sc int numodd = nCombination(odd); numodd nCombination(odd) nCombination odd int numeven = nCombination(even); numeven nCombination(even) nCombination even System.out.println(numodd + numeven) System.out.println System.out System System.out numodd + numeven numodd numeven String[] args args private static int nCombination(int count) {
        int num = 0;
        for (int i = 0; i < count - 1; i++) {
            for (int j = i + 1; j < count; j++) {
                num++;
            }
        }
    return num;
    } nCombination {
        int num = 0;
        for (int i = 0; i < count - 1; i++) {
            for (int j = i + 1; j < count; j++) {
                num++;
            }
        }
    return num;
    } int num = 0; num 0 for (int i = 0; i < count - 1; i++) {
            for (int j = i + 1; j < count; j++) {
                num++;
            }
        } int i = 0; int i = 0; i 0 i < count - 1 i count - 1 count 1 i++ i++ i {
            for (int j = i + 1; j < count; j++) {
                num++;
            }
        } {
            for (int j = i + 1; j < count; j++) {
                num++;
            }
        } for (int j = i + 1; j < count; j++) {
                num++;
            } int j = i + 1; int j = i + 1; j i + 1 i 1 j < count j count j++ j++ j {
                num++;
            } {
                num++;
            } num++ num return num; num int count count public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);

int odd = sc.nextInt();
int even = sc.nextInt();
  int numodd = nCombination(odd);
  int numeven = nCombination(even);
System.out.println(numodd + numeven);
}
  
  private static int nCombination(int count) {
        int num = 0;
        for (int i = 0; i < count - 1; i++) {
            for (int j = i + 1; j < count; j++) {
                num++;
            }
        }
    return num;
    }
  
} public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);

int odd = sc.nextInt();
int even = sc.nextInt();
  int numodd = nCombination(odd);
  int numeven = nCombination(even);
System.out.println(numodd + numeven);
}
  
  private static int nCombination(int count) {
        int num = 0;
        for (int i = 0; i < count - 1; i++) {
            for (int j = i + 1; j < count; j++) {
                num++;
            }
        }
    return num;
    }
  
} Main
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);

int odd = sc.nextInt();
int even = sc.nextInt();
  int numodd = nCombination(odd);
  int numeven = nCombination(even);
System.out.println(numodd + numeven);
}
  
  private static int nCombination(int count) {
        int num = 0;
        for (int i = 0; i < count - 1; i++) {
            for (int j = i + 1; j < count; j++) {
                num++;
            }
        }
    return num;
    }
  
}
