#sort N,K=(int(i) for i in input().split()) P=-1 if K==1: if N<3: P=0 else: A=1 i=3 while i