import sys import os IS_LOCAL = os.environ.get("LOCAL") == "true" def debug(*args, sep=" ", end="\n", flush=False) -> None: if IS_LOCAL: print(*args, sep=sep, end=end, file=sys.stderr, flush=flush) def yn(flg: bool) -> bool: print('Yes' if flg else 'No') return flg def main(): readline = sys.stdin.readline N, S, T, K = map(int, readline().split()) S -= 1 T -= 1 A = list(map(int, readline().split())) if A[S] + A[T] <= K: ans = 1 elif max(A[S], A[T]) + min(A) <= K: ans = 2 else: ans = -1 print(ans) if __name__ == "__main__": main()