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