with Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO;
 use Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO;

procedure main is
   N: Integer;
   M: Integer;
begin
   get(N);
   get(M);
   put(N * (N - 1) / 2 + M * (M - 1) / 2, 0);
end main;