#include <stdio.h> int main() { int n, m; scanf("%d %d", &n, &m); int s = n == m ? n * 2 : (n < m ? n : m) * 2 + 1; printf("%d\n", s); return 0; }