Skip to content

Instantly share code, notes, and snippets.

@mikl745
Created October 25, 2016 18:44
Show Gist options
  • Save mikl745/94d15948a3f138781ffbde62cef13b45 to your computer and use it in GitHub Desktop.
Save mikl745/94d15948a3f138781ffbde62cef13b45 to your computer and use it in GitHub Desktop.
# n, k =
n = int(input())
k = int(input())
# n = map(int,input(). split())
# k = map(int,input(). split())
# l = k - 2
# i = n - 1
# s = pow(n, l)
# x = pow(i, 2)
# print(x * s)
if n < k:
print(2 * n - 1)
elif n > k:
print(2 * k - 1)
elif n == k:
print(2 * k - 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment