import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int M = scanner.nextInt();
        
        int count = 0;
        for (int i = 0 ; i < N ; i++) {
            for (int j = i + 1 ; j < N ; j++) {
                count++;
            }
        }

        for (int i = 0 ; i < M ; i++) {
            for (int j = i + 1 ; j < M ; j++) {
                count++;
            }
        }

        System.out.println(count);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int M = scanner.nextInt();
        
        int count = 0;
        for (int i = 0 ; i < N ; i++) {
            for (int j = i + 1 ; j < N ; j++) {
                count++;
            }
        }

        for (int i = 0 ; i < M ; i++) {
            for (int j = i + 1 ; j < M ; j++) {
                count++;
            }
        }

        System.out.println(count);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int M = scanner.nextInt();
        
        int count = 0;
        for (int i = 0 ; i < N ; i++) {
            for (int j = i + 1 ; j < N ; j++) {
                count++;
            }
        }

        for (int i = 0 ; i < M ; i++) {
            for (int j = i + 1 ; j < M ; j++) {
                count++;
            }
        }

        System.out.println(count);
    } main {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int M = scanner.nextInt();
        
        int count = 0;
        for (int i = 0 ; i < N ; i++) {
            for (int j = i + 1 ; j < N ; j++) {
                count++;
            }
        }

        for (int i = 0 ; i < M ; i++) {
            for (int j = i + 1 ; j < M ; j++) {
                count++;
            }
        }

        System.out.println(count);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int M = scanner.nextInt(); M scanner.nextInt() scanner.nextInt scanner int count = 0; count 0 for (int i = 0 ; i < N ; i++) {
            for (int j = i + 1 ; j < N ; j++) {
                count++;
            }
        } int i = 0 ; int i = 0 ; i 0 i < N i N i++ i++ i {
            for (int j = i + 1 ; j < N ; j++) {
                count++;
            }
        } {
            for (int j = i + 1 ; j < N ; j++) {
                count++;
            }
        } for (int j = i + 1 ; j < N ; j++) {
                count++;
            } int j = i + 1 ; int j = i + 1 ; j i + 1 i 1 j < N j N j++ j++ j {
                count++;
            } {
                count++;
            } count++ count for (int i = 0 ; i < M ; i++) {
            for (int j = i + 1 ; j < M ; j++) {
                count++;
            }
        } int i = 0 ; int i = 0 ; i 0 i < M i M i++ i++ i {
            for (int j = i + 1 ; j < M ; j++) {
                count++;
            }
        } {
            for (int j = i + 1 ; j < M ; j++) {
                count++;
            }
        } for (int j = i + 1 ; j < M ; j++) {
                count++;
            } int j = i + 1 ; int j = i + 1 ; j i + 1 i 1 j < M j M j++ j++ j {
                count++;
            } {
                count++;
            } count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int M = scanner.nextInt();
        
        int count = 0;
        for (int i = 0 ; i < N ; i++) {
            for (int j = i + 1 ; j < N ; j++) {
                count++;
            }
        }

        for (int i = 0 ; i < M ; i++) {
            for (int j = i + 1 ; j < M ; j++) {
                count++;
            }
        }

        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int M = scanner.nextInt();
        
        int count = 0;
        for (int i = 0 ; i < N ; i++) {
            for (int j = i + 1 ; j < N ; j++) {
                count++;
            }
        }

        for (int i = 0 ; i < M ; i++) {
            for (int j = i + 1 ; j < M ; j++) {
                count++;
            }
        }

        System.out.println(count);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int M = scanner.nextInt();
        
        int count = 0;
        for (int i = 0 ; i < N ; i++) {
            for (int j = i + 1 ; j < N ; j++) {
                count++;
            }
        }

        for (int i = 0 ; i < M ; i++) {
            for (int j = i + 1 ; j < M ; j++) {
                count++;
            }
        }

        System.out.println(count);
    }
}
