Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n, k = map(int, input().split())
- oddCount = (n + 1) // 2
- evenCount = n // 2
- if k <= oddCount:
- print(k * 2 - 1)
- else:
- k -= oddCount
- print(k * 2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement