#include typedef uint32_t u32; typedef uint64_t u64; typedef int32_t s32; typedef int64_t s64; s32 ri() { s32 n; scanf("%" SCNd32, &n); return n; } int main() { #define int WHOOOO // 脱int訓練中につき許して s32 a = ri(), b = ri(); s32 tmp = std::min(std::max(a, b) - 1, std::min(a, b)); printf("%" PRId32 "\n", 2 * tmp); return 0; }