with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;

procedure Solve is
   A : Integer;
   B : Integer;
   score : Integer;
begin
   Get (A);
   Get (B);
   for I in 1 .. 2 loop
      if A >= B then
         score := score+A;
         A := A-1;
      else
         score := score+B;
         B := B-1;
      end if;
   end loop;
   Put_Line (Integer'Image (score));
end Solve;