import java.util.*;

public class Main{
    static int count=0;
    static int count1=0;
    public static void main(String[] args){
        int a=0;
        int b=0;
        Scanner sc = new Scanner(System.in);
        a=sc.nextInt();
        b=sc.nextInt();
       
        count = func(a);
        count1=func2(b);
        
        System.out.println((count)+(count1));
    }
    static int func(int a){
    if(a>=1)     
    count =(a-1)+func(a-1);
    return count;
    
    }
    static int func2(int b){
    if(b>=2)     
    count1 =(b-1)+func2(b-1);
    return count1;
    
    }
} import java.util.*; util.* java public class Main{
    static int count=0;
    static int count1=0;
    public static void main(String[] args){
        int a=0;
        int b=0;
        Scanner sc = new Scanner(System.in);
        a=sc.nextInt();
        b=sc.nextInt();
       
        count = func(a);
        count1=func2(b);
        
        System.out.println((count)+(count1));
    }
    static int func(int a){
    if(a>=1)     
    count =(a-1)+func(a-1);
    return count;
    
    }
    static int func2(int b){
    if(b>=2)     
    count1 =(b-1)+func2(b-1);
    return count1;
    
    }
} Main static int count=0; count 0 static int count1=0; count1 0 public static void main(String[] args){
        int a=0;
        int b=0;
        Scanner sc = new Scanner(System.in);
        a=sc.nextInt();
        b=sc.nextInt();
       
        count = func(a);
        count1=func2(b);
        
        System.out.println((count)+(count1));
    } main {
        int a=0;
        int b=0;
        Scanner sc = new Scanner(System.in);
        a=sc.nextInt();
        b=sc.nextInt();
       
        count = func(a);
        count1=func2(b);
        
        System.out.println((count)+(count1));
    } int a=0; a 0 int b=0; b 0 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) a=sc.nextInt() a sc.nextInt() sc.nextInt sc b=sc.nextInt() b sc.nextInt() sc.nextInt sc count = func(a) count func(a) func a count1=func2(b) count1 func2(b) func2 b System.out.println((count)+(count1)) System.out.println System.out System System.out (count)+(count1) (count) (count1) String[] args args static int func(int a){
    if(a>=1)     
    count =(a-1)+func(a-1);
    return count;
    
    } func {
    if(a>=1)     
    count =(a-1)+func(a-1);
    return count;
    
    } if(a>=1)     
    count =(a-1)+func(a-1); a>=1 a 1 count =(a-1)+func(a-1) count (a-1)+func(a-1) (a-1) a 1 func(a-1) func a-1 a 1 return count; count int a a static int func2(int b){
    if(b>=2)     
    count1 =(b-1)+func2(b-1);
    return count1;
    
    } func2 {
    if(b>=2)     
    count1 =(b-1)+func2(b-1);
    return count1;
    
    } if(b>=2)     
    count1 =(b-1)+func2(b-1); b>=2 b 2 count1 =(b-1)+func2(b-1) count1 (b-1)+func2(b-1) (b-1) b 1 func2(b-1) func2 b-1 b 1 return count1; count1 int b b public class Main{
    static int count=0;
    static int count1=0;
    public static void main(String[] args){
        int a=0;
        int b=0;
        Scanner sc = new Scanner(System.in);
        a=sc.nextInt();
        b=sc.nextInt();
       
        count = func(a);
        count1=func2(b);
        
        System.out.println((count)+(count1));
    }
    static int func(int a){
    if(a>=1)     
    count =(a-1)+func(a-1);
    return count;
    
    }
    static int func2(int b){
    if(b>=2)     
    count1 =(b-1)+func2(b-1);
    return count1;
    
    }
} public class Main{
    static int count=0;
    static int count1=0;
    public static void main(String[] args){
        int a=0;
        int b=0;
        Scanner sc = new Scanner(System.in);
        a=sc.nextInt();
        b=sc.nextInt();
       
        count = func(a);
        count1=func2(b);
        
        System.out.println((count)+(count1));
    }
    static int func(int a){
    if(a>=1)     
    count =(a-1)+func(a-1);
    return count;
    
    }
    static int func2(int b){
    if(b>=2)     
    count1 =(b-1)+func2(b-1);
    return count1;
    
    }
} Main
import java.util.*;

public class Main{
    static int count=0;
    static int count1=0;
    public static void main(String[] args){
        int a=0;
        int b=0;
        Scanner sc = new Scanner(System.in);
        a=sc.nextInt();
        b=sc.nextInt();
       
        count = func(a);
        count1=func2(b);
        
        System.out.println((count)+(count1));
    }
    static int func(int a){
    if(a>=1)     
    count =(a-1)+func(a-1);
    return count;
    
    }
    static int func2(int b){
    if(b>=2)     
    count1 =(b-1)+func2(b-1);
    return count1;
    
    }
}