def main(): a,b=map(int,input().split()) ans=min(a,b)*2-1 if a!=b: ans+=1 print(ans) if __name__ == "__main__": main()