"use strict";
function Main(input) {
    let lines = input.split("\n");
    let ab = lines.shift().split(/\s/).map((v) => v - 0);
    let A = ab[0], B = ab[1];
    let set = [[A, A-1], [A, B], [B, B-1]];
    let sum = set.map((v) => v[0] + v[1]);
    let ans = Math.max(...sum);
    console.log(ans);
}
if (typeof window == "undefined") Main(require("fs").readFileSync("/dev/stdin", "utf8"));