using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static long[] NList => ReadLine().Split().Select(long.Parse).ToArray(); static long[][] NArr(int n) => Enumerable.Repeat(0, n).Select(_ => NList).ToArray(); static void Main() { var c = NList; var (a, b) = (c[0], c[1]); if (Math.Abs(a - b) > 1) { var d = Math.Abs(a - b) - 1; WriteLine(a + b + d); } else { WriteLine(a + b); } } }