import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();
    int nres=1,mres=1;
    for(int i=n;i>(n-2);i--) nres*=i;
    for(int i=m;i>(m-2);i--) mres*=i;
    nres/=2;
    mres/=2;
    System.out.println(nres+mres);                             
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();
    int nres=1,mres=1;
    for(int i=n;i>(n-2);i--) nres*=i;
    for(int i=m;i>(m-2);i--) mres*=i;
    nres/=2;
    mres/=2;
    System.out.println(nres+mres);                             
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();
    int nres=1,mres=1;
    for(int i=n;i>(n-2);i--) nres*=i;
    for(int i=m;i>(m-2);i--) mres*=i;
    nres/=2;
    mres/=2;
    System.out.println(nres+mres);                             
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();
    int nres=1,mres=1;
    for(int i=n;i>(n-2);i--) nres*=i;
    for(int i=m;i>(m-2);i--) mres*=i;
    nres/=2;
    mres/=2;
    System.out.println(nres+mres);                             
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int nres=1 nres 1 mres=1; mres 1 for(int i=n;i>(n-2);i--) nres*=i; int i=n; int i=n; i n i>(n-2) i (n-2) n 2 i-- i-- i nres*=i; nres*=i nres i for(int i=m;i>(m-2);i--) mres*=i; int i=m; int i=m; i m i>(m-2) i (m-2) m 2 i-- i-- i mres*=i; mres*=i mres i nres/=2 nres 2 mres/=2 mres 2 System.out.println(nres+mres) System.out.println System.out System System.out nres+mres nres mres String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();
    int nres=1,mres=1;
    for(int i=n;i>(n-2);i--) nres*=i;
    for(int i=m;i>(m-2);i--) mres*=i;
    nres/=2;
    mres/=2;
    System.out.println(nres+mres);                             
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();
    int nres=1,mres=1;
    for(int i=n;i>(n-2);i--) nres*=i;
    for(int i=m;i>(m-2);i--) mres*=i;
    nres/=2;
    mres/=2;
    System.out.println(nres+mres);                             
  }
} Main
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();
    int nres=1,mres=1;
    for(int i=n;i>(n-2);i--) nres*=i;
    for(int i=m;i>(m-2);i--) mres*=i;
    nres/=2;
    mres/=2;
    System.out.println(nres+mres);                             
  }
}