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



Sample input:
5 3


Sample output:
9

Submission status: Runtime Error

Solution code:
a,b=map(raw_input().split())

if abs(a-b)<=1:
	print a+b
else:
	print a+b+1

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
sum = 0
sum += max(a,b)
if a < b:
  a -= 1
else:
  b -= 1
sum += max(a,b)
print(sum)

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=a+a-1
d=a+b
e=b+b-1
m=c
if m<e:
    m=e
if m<d:
    m=d
print(m)

Submission status: Runtime Error

Solution code:
A, B = list(map(int,input()))
def button(A, B):
  if A > B:
    result = A
    return([A - 1, B, result])
  elif A = B:
    result = A
    return([A - 1, B, result])
  else:
    result = B
    return([A, B - 1, result])

A, B, result_1 = button(A, B)
A, B, result_2 = button(A, B)

print(result_1 + result_2)

Submission status: Runtime Error

Solution code:
l = sorted([int(input)) for i in range(2)])
if l[1]-1>=l[0]:
  print(l[1]*2-1)
elif: l[1] == l[0]:
  print(l[0]*2)
else:
  print(l[0]+l[1]-1)

Submission status: Runtime Error

Solution code:
A = input()
B = input()
sum = 0

for i in range(1):
  if A>=B:
    sum = sum + A
    A = A - 1
  else:
    sum = sum + B
    B = B - 1
    
print(sum)

Submission status: Runtime Error

Solution code:
A,B = map(int, input().split())
c=0
if max(A, B) -2 >= min(A,B):
  c = max(A,B) + max(A,B) - 1
else:
  c = sum(A,B)
print(c)

Submission status: Runtime Error

Solution code:
#https://atcoder.jp/contests/abc124
# -*- coding: utf-8 -*-

a,b = map(int,input().split())
c += max(a,b)
c += max(a,b)-1
print(c)

Submission status: Runtime Error

Solution code:
A,B = map(int,input().split())
A,B = map(int,input().split())
if B < A:
    n = A
    A -= 1
else:
    n = B
    B -= 1
if B < A:
    n += A
else:
    n += B

print(n)

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split)
sum = 0
if A < B:
  sum += B
  B = B-1
else:
  sum += A
  A = A-1

if A < B:
  sum += B
  B = B-1
else:
  sum += A
  A = A-1

print(sum)

Submission status: Runtime Error

Solution code:
a,b=map( raw_input(), int)
ans=max([a+a-1,b+b-1,a+b])
print ans

Submission status: Runtime Error

Solution code:
#define __USE_MINGW_ANSI_STDIO 0
#include <iostream>
#include <string>
#include <vector>
#include <stdio.h>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <set>
#include <numeric>
#include <bitset>
#include <map>
#include <limits.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define rep(i,n) for(int i=0;i<=n;i++)
using namespace std;
typedef unsigned long ul;
typedef pair<ul, ul> P;


/// 各桁の和
int sumdigit(int x){
   int sum = 0;
    while(x != 0){
        sum += x % 10;
        x /= 10;    
    }
    return sum;
}
/// 最大公約数 
int gcd(int x, int y){
      if(x<y){
          int temp = x;
          x = y;
          y = temp;
      }
      int r = x % y;
       while(r!=0){
           x = y;
           y = r;
           r = x % y;
       }
      return y;
   }



int main(){
int A,B;
cin >> A >> B;
int ans = 0;
REP(i,2){
    if(A >= B){
        ans+=A;
        A--;
    }
    else {
        ans+=B;
        B--;
    }
}
cout << ans << endl;

}

Submission status: Runtime Error

Solution code:
import os
import sys

a=int(input())
b=int(input())

c=a+a-1
d=a+b
e=b+b-1
m=0
if c<d:
    m=d
if m<e:
    m=e
if m<d:
    m=d
print(m)

Submission status: Runtime Error

Solution code:
a,b=map(int, raw_input())
ans=max([a+a-1,b+b-1,a+b])
print ans

Submission status: Runtime Error

Solution code:
a, b = list(map(int, input().split()))

if a == b:
    print(a+b)
else:
    print(max(a, b)*2-1

Submission status: Runtime Error

Solution code:
A , B = map(int , input().split())

if A > B + 1:
	print(2*A - 1)
elif B > A + 1:
	print(2*b - 1)
else:
	print(A + B)

Submission status: Runtime Error

Solution code:
import sys


def main(argv):
    a = argv[0]
    b = argv[1]
    _sum = 0
    for i in range(2):
        if a > b:
            sum += a
            a -= 1
        else:
            sum += b
            b -= 1
    print(_sum)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Runtime Error

Solution code:
a,b=map(int, raw_input())
ans=Max([a+a-1,b+b-1,a+b])
print ans

Submission status: Runtime Error

Solution code:
a,b=int(input())
if a-1=>b:
  print(2*a-1)
elif a==b:
  print(2a)
else:
  print(2*b-1)

Submission status: Runtime Error

Solution code:
tmp=input().sprit(" ")
a = int(tmp[0])
b = int(tmp[1])

if a == b:
    print (a*2)
else:
    print (max(a,b)*2-1)

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())

ans=0
if a > b:
    ans+=a
    a-=1
else:
    ans+=b
    b-=1

if a > b:
    ans+=a
    a-=1
else:
    ans+=b
    b-=1

print(ans)X

Submission status: Runtime Error

Solution code:
a, b = int(input())
ans = 0
ans += max(a, b)*2 - 1
print(ans)

Submission status: Runtime Error

Solution code:
tmp=input().sprit(" ")
a = int(tmp[0])
b = int(tmp[1])

if a = b:
    print (a*2)
else:
    print (max(a,b)*2-1)

Submission status: Runtime Error

Solution code:
AB = map(int, input().split())
kk = 0
if AB[0] > AB[1]:
  kk = kk + AB[0]
  AB[0] = AB[0] - 1
else:
  kk = kk + AB[1]
  AB[1] = AB[1] - 1
if AB[0] > AB[1]:
  kk = kk + AB[0]
  AB[0] = AB[0] - 1
else:
  kk = kk + AB[1]
  AB[1] = AB[1] - 1
  
print(kk)

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
print(max(a,b)*2-1

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
if a-b >= 2:
  print(2a-1)
elif b-a >= 2:
  print(2b-1)
else:
  print(a+b)

Submission status: Runtime Error

Solution code:
A, B = map(int,iput().split())

if A > B:
  print(2 * A - 1)
elif A < B:
  print(2 * B - 1)
else:
  print(A + B)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())


x = a+b
y = a+a-1
z = b+b-1

list = [x,y,z]

max = max(list)


print(max)

Submission status: Runtime Error

Solution code:
a,b=map(int,input());ans=0
if a<b:ans+=b;b-=1
else:ans+=a;a-=1
ans+=max(a,b)
print(ans)

Submission status: Runtime Error

Solution code:
A,B = map(int,input().split())
print(max(A,B)+max(max(A-1,B),max(A,B-1))

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
print(max(a, b) * 2 - 1)

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
print(max(a+a-1,a+b,b+b-1)

Submission status: Runtime Error

Solution code:
#include "bits/stdc++.h"

using namespace std;
#ifdef _DEBUG
#define _GLIBCXX_DEBUG
#include "dump.hpp"
#else
#define dump(...)
#endif

#define int long long
#define ll long long
#define DBG 1
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define rrep(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define loop(n) rep(loop, (0), (n))
#define all(c) begin(c), end(c)
const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
const int MOD = (int)(1e9) + 7;
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
using pii = pair<int, int>;
// template<class T> ostream &operator<<(ostream &os,T &t){dump(t);return os;}
template <typename T, typename S>istream &operator>>(istream &is, pair<T, S> &p) { is >> p.first >> p.second; return is; }
template <typename T, typename S>ostream &operator<<(ostream &os, pair<T, S> &p) { os << p.first << " " << p.second; return os; }

template <typename T> void printvv(const vector<vector<T>> &v) {
	cerr << endl;
	rep(i, 0, v.size()) rep(j, 0, v[i].size()) {
		if (typeid(v[i][j]).name() == typeid(INF).name() and v[i][j] == INF) {
			cerr << "INF";
		}
		else
			cerr << v[i][j];
		cerr << (j == v[i].size() - 1 ? '\n' : ' ');
	}
	cerr << endl;
}

#ifndef _DEBUG
#define printvv(...)
#endif
void YES(bool f) { cout << (f ? "YES" : "NO") << endl; }
void Yes(bool f) { cout << (f ? "Yes" : "No") << endl; }
template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return true; }return false; }
template <class T> bool chmin(T &a, const T &b) { if (a > b) { a = b; return true; }return false; }

signed main(signed argc, char *argv[]) {
	cin.tie(0);
	ios::sync_with_stdio(false);
	cout << fixed << setprecision(12);

	int N, M; cin >> N >> M;
	cout << max({ 2 * N,N + M,2 * M }) << endl;

	return 0;
}