N, K = map(int, input().split()) print(K - 1)