import java.util.*;
import java.lang.*;

public class Main {

    public static void main(String args[]) { 

        Scanner sc = new Scanner(System.in);
        
        int N = sc.nextInt();
        int M = sc.nextInt();

        int count = 0;
        int[] arr1 = new int[N];
        int[] arr2 = new int[M];
        int k=2;
        for(int i=0; i<N; i++){
            arr1[i] = k;
            k = k + 2;
        }
        int j = 1;
        for(int i=0; i<M; i++){
            arr2[i] = j;
            j = j + 2;
        }

        for(int i=0; i<(arr1.length); i++){
            for(int p=(i+1); p<(arr1.length); p++) {
                if(((arr1[i] + arr1[p]) & 1) == 0)
                count++;
            }
        }

        for(int i=0; i<(arr2.length); i++){
            for(int p=(i+1); p<(arr2.length); p++) {
                if(((arr2[i] + arr2[p]) & 1) == 0)
                count++;
            } 
        }
        System.out.println(count);
        

        sc.close();
    }
}
     import java.util.*; util.* java import java.lang.*; lang.* 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 count = 0;
        int[] arr1 = new int[N];
        int[] arr2 = new int[M];
        int k=2;
        for(int i=0; i<N; i++){
            arr1[i] = k;
            k = k + 2;
        }
        int j = 1;
        for(int i=0; i<M; i++){
            arr2[i] = j;
            j = j + 2;
        }

        for(int i=0; i<(arr1.length); i++){
            for(int p=(i+1); p<(arr1.length); p++) {
                if(((arr1[i] + arr1[p]) & 1) == 0)
                count++;
            }
        }

        for(int i=0; i<(arr2.length); i++){
            for(int p=(i+1); p<(arr2.length); p++) {
                if(((arr2[i] + arr2[p]) & 1) == 0)
                count++;
            } 
        }
        System.out.println(count);
        

        sc.close();
    }
} Main public static void main(String args[]) { 

        Scanner sc = new Scanner(System.in);
        
        int N = sc.nextInt();
        int M = sc.nextInt();

        int count = 0;
        int[] arr1 = new int[N];
        int[] arr2 = new int[M];
        int k=2;
        for(int i=0; i<N; i++){
            arr1[i] = k;
            k = k + 2;
        }
        int j = 1;
        for(int i=0; i<M; i++){
            arr2[i] = j;
            j = j + 2;
        }

        for(int i=0; i<(arr1.length); i++){
            for(int p=(i+1); p<(arr1.length); p++) {
                if(((arr1[i] + arr1[p]) & 1) == 0)
                count++;
            }
        }

        for(int i=0; i<(arr2.length); i++){
            for(int p=(i+1); p<(arr2.length); p++) {
                if(((arr2[i] + arr2[p]) & 1) == 0)
                count++;
            } 
        }
        System.out.println(count);
        

        sc.close();
    } main { 

        Scanner sc = new Scanner(System.in);
        
        int N = sc.nextInt();
        int M = sc.nextInt();

        int count = 0;
        int[] arr1 = new int[N];
        int[] arr2 = new int[M];
        int k=2;
        for(int i=0; i<N; i++){
            arr1[i] = k;
            k = k + 2;
        }
        int j = 1;
        for(int i=0; i<M; i++){
            arr2[i] = j;
            j = j + 2;
        }

        for(int i=0; i<(arr1.length); i++){
            for(int p=(i+1); p<(arr1.length); p++) {
                if(((arr1[i] + arr1[p]) & 1) == 0)
                count++;
            }
        }

        for(int i=0; i<(arr2.length); i++){
            for(int p=(i+1); p<(arr2.length); p++) {
                if(((arr2[i] + arr2[p]) & 1) == 0)
                count++;
            } 
        }
        System.out.println(count);
        

        sc.close();
    } 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 count = 0; count 0 int[] arr1 = new int[N]; arr1 new int[N] N int[] arr2 = new int[M]; arr2 new int[M] M int k=2; k 2 for(int i=0; i<N; i++){
            arr1[i] = k;
            k = k + 2;
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            arr1[i] = k;
            k = k + 2;
        } {
            arr1[i] = k;
            k = k + 2;
        } arr1[i] = k arr1[i] arr1 i k k = k + 2 k k + 2 k 2 int j = 1; j 1 for(int i=0; i<M; i++){
            arr2[i] = j;
            j = j + 2;
        } int i=0; int i=0; i 0 i<M i M i++ i++ i {
            arr2[i] = j;
            j = j + 2;
        } {
            arr2[i] = j;
            j = j + 2;
        } arr2[i] = j arr2[i] arr2 i j j = j + 2 j j + 2 j 2 for(int i=0; i<(arr1.length); i++){
            for(int p=(i+1); p<(arr1.length); p++) {
                if(((arr1[i] + arr1[p]) & 1) == 0)
                count++;
            }
        } int i=0; int i=0; i 0 i<(arr1.length) i (arr1.length) arr1 arr1.length i++ i++ i {
            for(int p=(i+1); p<(arr1.length); p++) {
                if(((arr1[i] + arr1[p]) & 1) == 0)
                count++;
            }
        } {
            for(int p=(i+1); p<(arr1.length); p++) {
                if(((arr1[i] + arr1[p]) & 1) == 0)
                count++;
            }
        } for(int p=(i+1); p<(arr1.length); p++) {
                if(((arr1[i] + arr1[p]) & 1) == 0)
                count++;
            } int p=(i+1); int p=(i+1); p (i+1) i 1 p<(arr1.length) p (arr1.length) arr1 arr1.length p++ p++ p {
                if(((arr1[i] + arr1[p]) & 1) == 0)
                count++;
            } {
                if(((arr1[i] + arr1[p]) & 1) == 0)
                count++;
            } if(((arr1[i] + arr1[p]) & 1) == 0)
                count++; ((arr1[i] + arr1[p]) & 1) == 0 ((arr1[i] + arr1[p]) & 1) (arr1[i] + arr1[p]) arr1[i] arr1 i arr1[p] arr1 p 1 0 count++ count for(int i=0; i<(arr2.length); i++){
            for(int p=(i+1); p<(arr2.length); p++) {
                if(((arr2[i] + arr2[p]) & 1) == 0)
                count++;
            } 
        } int i=0; int i=0; i 0 i<(arr2.length) i (arr2.length) arr2 arr2.length i++ i++ i {
            for(int p=(i+1); p<(arr2.length); p++) {
                if(((arr2[i] + arr2[p]) & 1) == 0)
                count++;
            } 
        } {
            for(int p=(i+1); p<(arr2.length); p++) {
                if(((arr2[i] + arr2[p]) & 1) == 0)
                count++;
            } 
        } for(int p=(i+1); p<(arr2.length); p++) {
                if(((arr2[i] + arr2[p]) & 1) == 0)
                count++;
            } int p=(i+1); int p=(i+1); p (i+1) i 1 p<(arr2.length) p (arr2.length) arr2 arr2.length p++ p++ p {
                if(((arr2[i] + arr2[p]) & 1) == 0)
                count++;
            } {
                if(((arr2[i] + arr2[p]) & 1) == 0)
                count++;
            } if(((arr2[i] + arr2[p]) & 1) == 0)
                count++; ((arr2[i] + arr2[p]) & 1) == 0 ((arr2[i] + arr2[p]) & 1) (arr2[i] + arr2[p]) arr2[i] arr2 i arr2[p] arr2 p 1 0 count++ count System.out.println(count) System.out.println System.out System System.out count sc.close() sc.close sc 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 count = 0;
        int[] arr1 = new int[N];
        int[] arr2 = new int[M];
        int k=2;
        for(int i=0; i<N; i++){
            arr1[i] = k;
            k = k + 2;
        }
        int j = 1;
        for(int i=0; i<M; i++){
            arr2[i] = j;
            j = j + 2;
        }

        for(int i=0; i<(arr1.length); i++){
            for(int p=(i+1); p<(arr1.length); p++) {
                if(((arr1[i] + arr1[p]) & 1) == 0)
                count++;
            }
        }

        for(int i=0; i<(arr2.length); i++){
            for(int p=(i+1); p<(arr2.length); p++) {
                if(((arr2[i] + arr2[p]) & 1) == 0)
                count++;
            } 
        }
        System.out.println(count);
        

        sc.close();
    }
} public class Main {

    public static void main(String args[]) { 

        Scanner sc = new Scanner(System.in);
        
        int N = sc.nextInt();
        int M = sc.nextInt();

        int count = 0;
        int[] arr1 = new int[N];
        int[] arr2 = new int[M];
        int k=2;
        for(int i=0; i<N; i++){
            arr1[i] = k;
            k = k + 2;
        }
        int j = 1;
        for(int i=0; i<M; i++){
            arr2[i] = j;
            j = j + 2;
        }

        for(int i=0; i<(arr1.length); i++){
            for(int p=(i+1); p<(arr1.length); p++) {
                if(((arr1[i] + arr1[p]) & 1) == 0)
                count++;
            }
        }

        for(int i=0; i<(arr2.length); i++){
            for(int p=(i+1); p<(arr2.length); p++) {
                if(((arr2[i] + arr2[p]) & 1) == 0)
                count++;
            } 
        }
        System.out.println(count);
        

        sc.close();
    }
} Main
import java.util.*;
import java.lang.*;

public class Main {

    public static void main(String args[]) { 

        Scanner sc = new Scanner(System.in);
        
        int N = sc.nextInt();
        int M = sc.nextInt();

        int count = 0;
        int[] arr1 = new int[N];
        int[] arr2 = new int[M];
        int k=2;
        for(int i=0; i<N; i++){
            arr1[i] = k;
            k = k + 2;
        }
        int j = 1;
        for(int i=0; i<M; i++){
            arr2[i] = j;
            j = j + 2;
        }

        for(int i=0; i<(arr1.length); i++){
            for(int p=(i+1); p<(arr1.length); p++) {
                if(((arr1[i] + arr1[p]) & 1) == 0)
                count++;
            }
        }

        for(int i=0; i<(arr2.length); i++){
            for(int p=(i+1); p<(arr2.length); p++) {
                if(((arr2[i] + arr2[p]) & 1) == 0)
                count++;
            } 
        }
        System.out.println(count);
        

        sc.close();
    }
}
    