from bisect import bisect_left,bisect_right N,K = map(int,input().split()) X = list(map(int,input().split())) A = list(map(int,input().split())) INFTY = 2*10**17 xmax = -INFTY xmin = INFTY K -= 1 ind_low = K ind_high = K while True: if xmin<=X[ind_low]-A[ind_low] and xmax>=X[ind_high]+A[ind_high]: break if xmin>X[ind_low]-A[ind_low]: xmin = X[ind_low]-A[ind_low] if xmax