n, s, t, k = map(int, input().split()) a = list(map(int, input().split())) s -= 1 t -= 1 print(1 if a[s] + a[t] <= k else 2 if max(a[s], a[t]) + min(a) <= k else -1)