Problem:
Score : 100 points

Problem Statement

There are two buttons, one of size A and one of size B.

When you press a button of size X, you get X coins and the size of that button decreases by 1.

You will press a button twice. Here, you can press the same button twice, or press both buttons once.

At most how many coins can you get?

Constraints

All values in input are integers.

3 \leq A, B \leq 20

Input

Input is given from Standard Input in the following format:

A B

Output

Print the maximum number of coins you can get.

Sample Input 1

5 3

Sample Output 1

9

You can get 5 + 4 = 9 coins by pressing the button of size 5 twice, and this is the maximum result.

Sample Input 2

3 4

Sample Output 2

7

Sample Input 3

6 6

Sample Output 3

12

Solution in C# (Mono 4.6.2.0) (judge verdict: Accepted)

using System;
using System.Linq;

namespace ConsoleApp1
{
    class TestCase
    {
        public int A { get; } = 0;
        public int B { get; } = 0;
        public TestCase(int a, int b)
        {
            A = a;
            B = b;
        }
    }

    class SampleTestCase
    {
        public TestCase TC { get; } = new TestCase(0, 0);
        public int ANS { get; } = 0;
        public SampleTestCase(TestCase tc, int ans)
        {
            TC = tc;
            ANS = ans;
        }
        public void EXPECT_EQ(int val)
        {
            if(ANS == val)
            {
                Console.WriteLine("Test OK");
            }
            else
            {
                Console.WriteLine("Test NG : ANS = " + ANS + ", SolveValue = " + val);
            }
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            ExecuteProblem();
            //ExecuteSampleTest();
        }

        private static void ExecuteSampleTest()
        {
            var sampleTestCases = new SampleTestCase[] {
                  new SampleTestCase(new TestCase(5, 3), 9)
                , new SampleTestCase(new TestCase(3, 4), 7)
                , new SampleTestCase(new TestCase(6, 6), 12) };

            foreach (var stc in sampleTestCases)
            {
                stc.EXPECT_EQ(Solve(stc.TC));
            }
        }
        private static void ExecuteProblem()
        {
            string[] ab = Console.ReadLine().Split(' ');
            TestCase tc = new TestCase(int.Parse(ab[0]), int.Parse(ab[1]));
            Console.WriteLine(Solve(tc));
        }

        private static int Solve(TestCase tc)
        {
            int coinEqVal = tc.A == tc.B ? tc.A + tc.B : 0;
            int[] coins = new int[] {(tc.A + tc.A - 1), (tc.A + tc.B - 1), (tc.B + tc.B - 1), coinEqVal};
            return coins.Max();
        }
    }
}