import std.stdio, std.conv, std.array; void main() { auto NK = readln.split.to!(ulong[]); writeln(NK[1]-1); }