Do you know the story about the three musketeers? Anyway, you must help them now.

Richelimakieu is a cardinal in the city of Bearis. He found three brave warriors and called them the three musketeers. Athos has strength a, Borthos strength b, and Caramis has strength c.

The year 2015 is almost over and there are still n criminals to be defeated. The i-th criminal has strength ti. It's hard to defeat strong criminals — maybe musketeers will have to fight together to achieve it.

Richelimakieu will coordinate musketeers' actions. In each hour each musketeer can either do nothing or be assigned to one criminal. Two or three musketeers can be assigned to the same criminal and then their strengths are summed up. A criminal can be defeated in exactly one hour (also if two or three musketeers fight him). Richelimakieu can't allow the situation where a criminal has strength bigger than the sum of strengths of musketeers fighting him — a criminal would win then!

In other words, there are three ways to defeat a criminal.

  * A musketeer of the strength x in one hour can defeat a criminal of the strength not greater than x. So, for example Athos in one hour can defeat criminal i only if ti ≤ a. 
  * Two musketeers can fight together and in one hour defeat a criminal of the strength not greater than the sum of strengths of these two musketeers. So, for example Athos and Caramis in one hour can defeat criminal i only if ti ≤ a + c. Note that the third remaining musketeer can either do nothing or fight some other criminal. 
  * Similarly, all three musketeers can fight together and in one hour defeat a criminal of the strength not greater than the sum of musketeers' strengths, i.e. ti ≤ a + b + c. 



Richelimakieu doesn't want musketeers to fight during the New Year's Eve. Thus, he must coordinate their actions in order to minimize the number of hours till all criminals will be defeated.

Find the minimum number of hours to defeat all criminals. If musketeers can't defeat them all then print "-1" (without the quotes) instead.

Input

The first line of the input contains a single integer n (1 ≤ n ≤ 200 000) — the number of criminals.

The second line contains three integers a, b and c (1 ≤ a, b, c ≤ 108) — strengths of musketeers.

The third line contains n integers t1, t2, ..., tn (1 ≤ ti ≤ 108) — strengths of criminals.

Output

Print one line with the answer.

If it's impossible to defeat all criminals, print "-1" (without the quotes). Otherwise, print the minimum number of hours the three musketeers will spend on defeating all criminals.

Examples

Input

5
10 20 30
1 1 1 1 50


Output

2


Input

5
10 20 30
1 1 1 1 51


Output

3


Input

7
30 20 10
34 19 50 33 88 15 20


Output

-1


Input

6
10 5 10
10 9 5 25 20 5


Output

3

Note

In the first sample Athos has strength 10, Borthos 20, and Caramis 30. They can defeat all criminals in two hours:

  * Borthos and Caramis should together fight a criminal with strength 50. In the same hour Athos can fight one of four criminals with strength 1. 
  * There are three criminals left, each with strength 1. Each musketeer can fight one criminal in the second hour. 



In the second sample all three musketeers must together fight a criminal with strength 51. It takes one hour. In the second hour they can fight separately, each with one criminal. In the third hour one criminal is left and any of musketeers can fight him.
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.TreeSet;
import java.io.OutputStreamWriter;
import java.util.NoSuchElementException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Iterator;
import java.io.BufferedWriter;
import java.util.NavigableSet;
import java.io.IOException;
import java.io.Writer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Egor Kulikov (egor@egork.net)
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskE solver = new TaskE();
		solver.solve(1, in, out);
		out.close();
	}

	static class TaskE {
		public void solve(int testNumber, InputReader in, OutputWriter out) {
			int n = in.readInt();
			int[] aa = IOUtils.readIntArray(in, 3);
			int[] t = Arrays.copyOf(IOUtils.readIntArray(in, n), n + 1);
			NavigableSet<Integer> bad = new TreeSet<>((x, y) -> t[x] != t[y] ? t[x] - t[y] : x - y);
			for (int i = 0; i < n; i++) {
				bad.add(i);
			}
			ArrayUtils.sort(aa);
			int a = aa[0];
			int b = aa[1];
			int c = aa[2];
			if (t[bad.last()] > a + b + c) {
				out.printLine(-1);
				return;
			}
			int answer = 0;
			while (t[bad.last()] > b + c) {
				bad.pollLast();
				answer++;
				if (bad.isEmpty()) {
					out.printLine(answer);
					return;
				}
			}
			while (t[bad.last()] > a + c) {
				bad.pollLast();
				answer++;
				t[n] = a;
				Integer x = bad.lower(n);
				if (x != null) {
					bad.remove(x);
				}
				if (bad.isEmpty()) {
					out.printLine(answer);
					return;
				}
			}
			int lim = Math.max(a + b, c);
			while (t[bad.last()] > lim) {
				bad.pollLast();
				answer++;
				t[n] = b;
				Integer x = bad.lower(n);
				if (x != null) {
					bad.remove(x);
				}
				if (bad.isEmpty()) {
					out.printLine(answer);
					return;
				}
			}
			while (t[bad.last()] > c) {
				bad.pollLast();
				answer++;
				t[n] = c;
				Integer x = bad.lower(n);
				if (x != null) {
					bad.remove(x);
				}
				if (bad.isEmpty()) {
					out.printLine(answer);
					return;
				}
			}
			while (true) {
				bad.pollLast();
				answer++;
				t[n] = a;
				Integer x = bad.lower(n);
				t[n] = b;
				Integer y = bad.lower(n);
				if (x != null && y != null && x.equals(y)) {
					y = bad.lower(x);
				}
				if (x != null && y != null) {
					bad.remove(x);
					bad.remove(y);
				} else {
					t[n] = a + b;
					x = bad.lower(n);
					if (x != null) {
						bad.remove(x);
					}
				}
				if (bad.isEmpty()) {
					out.printLine(answer);
					return;
				}
			}
		}

	}

	static class IOUtils {
		public static int[] readIntArray(InputReader in, int size) {
			int[] array = new int[size];
			for (int i = 0; i < size; i++)
				array[i] = in.readInt();
			return array;
		}

	}

	static interface IntComparator {
		public static final IntComparator DEFAULT = (first, second) -> {
			if (first < second) {
				return -1;
			}
			if (first > second) {
				return 1;
			}
			return 0;
		};

		public int compare(int first, int second);

	}

	static interface IntIterator {
		public int value() throws NoSuchElementException;

		public boolean advance();

		public boolean isValid();

	}

	static class IntArrayList extends IntAbstractStream implements IntList {
		private int size;
		private int[] data;

		public IntArrayList() {
			this(3);
		}

		public IntArrayList(int capacity) {
			data = new int[capacity];
		}

		public IntArrayList(IntCollection c) {
			this(c.size());
			addAll(c);
		}

		public IntArrayList(IntStream c) {
			this();
			if (c instanceof IntCollection) {
				ensureCapacity(((IntCollection) c).size());
			}
			addAll(c);
		}

		public IntArrayList(IntArrayList c) {
			size = c.size();
			data = c.data.clone();
		}

		public IntArrayList(int[] arr) {
			size = arr.length;
			data = arr.clone();
		}

		public int size() {
			return size;
		}

		public int get(int at) {
			if (at >= size) {
				throw new IndexOutOfBoundsException("at = " + at + ", size = " + size);
			}
			return data[at];
		}

		private void ensureCapacity(int capacity) {
			if (data.length >= capacity) {
				return;
			}
			capacity = Math.max(2 * data.length, capacity);
			data = Arrays.copyOf(data, capacity);
		}

		public void addAt(int index, int value) {
			ensureCapacity(size + 1);
			if (index > size || index < 0) {
				throw new IndexOutOfBoundsException("at = " + index + ", size = " + size);
			}
			if (index != size) {
				System.arraycopy(data, index, data, index + 1, size - index);
			}
			data[index] = value;
			size++;
		}

		public void removeAt(int index) {
			if (index >= size || index < 0) {
				throw new IndexOutOfBoundsException("at = " + index + ", size = " + size);
			}
			if (index != size - 1) {
				System.arraycopy(data, index + 1, data, index, size - index - 1);
			}
			size--;
		}

		public void set(int index, int value) {
			if (index >= size) {
				throw new IndexOutOfBoundsException("at = " + index + ", size = " + size);
			}
			data[index] = value;
		}

	}

	static interface IntCollection extends IntStream {
		public int size();

		default public void add(int value) {
			throw new UnsupportedOperationException();
		}

		default public IntCollection addAll(IntStream values) {
			for (IntIterator it = values.intIterator(); it.isValid(); it.advance()) {
				add(it.value());
			}
			return this;
		}

	}

	static abstract class IntAbstractStream implements IntStream {

		public String toString() {
			StringBuilder builder = new StringBuilder();
			boolean first = true;
			for (IntIterator it = intIterator(); it.isValid(); it.advance()) {
				if (first) {
					first = false;
				} else {
					builder.append(' ');
				}
				builder.append(it.value());
			}
			return builder.toString();
		}


		public boolean equals(Object o) {
			if (!(o instanceof IntStream)) {
				return false;
			}
			IntStream c = (IntStream) o;
			IntIterator it = intIterator();
			IntIterator jt = c.intIterator();
			while (it.isValid() && jt.isValid()) {
				if (it.value() != jt.value()) {
					return false;
				}
				it.advance();
				jt.advance();
			}
			return !it.isValid() && !jt.isValid();
		}


		public int hashCode() {
			int result = 0;
			for (IntIterator it = intIterator(); it.isValid(); it.advance()) {
				result *= 31;
				result += it.value();
			}
			return result;
		}

	}

	static interface IntList extends IntReversableCollection {
		public abstract int get(int index);

		public abstract void set(int index, int value);

		public abstract void addAt(int index, int value);

		public abstract void removeAt(int index);

		default public void swap(int first, int second) {
			if (first == second) {
				return;
			}
			int temp = get(first);
			set(first, get(second));
			set(second, temp);
		}

		default public IntIterator intIterator() {
			return new IntIterator() {
				private int at;
				private boolean removed;

				public int value() {
					if (removed) {
						throw new IllegalStateException();
					}
					return get(at);
				}

				public boolean advance() {
					at++;
					removed = false;
					return isValid();
				}

				public boolean isValid() {
					return !removed && at < size();
				}

				public void remove() {
					removeAt(at);
					at--;
					removed = true;
				}
			};
		}


		default public void add(int value) {
			addAt(size(), value);
		}

		default public IntList sort(IntComparator comparator) {
			Sorter.sort(this, comparator);
			return this;
		}

		default public IntList subList(final int from, final int to) {
			return new IntList() {
				private final int shift;
				private final int size;

				{
					if (from < 0 || from > to || to > IntList.this.size()) {
						throw new IndexOutOfBoundsException("from = " + from + ", to = " + to + ", size = " + size());
					}
					shift = from;
					size = to - from;
				}

				public int size() {
					return size;
				}

				public int get(int at) {
					if (at < 0 || at >= size) {
						throw new IndexOutOfBoundsException("at = " + at + ", size = " + size());
					}
					return IntList.this.get(at + shift);
				}

				public void addAt(int index, int value) {
					throw new UnsupportedOperationException();
				}

				public void removeAt(int index) {
					throw new UnsupportedOperationException();
				}

				public void set(int at, int value) {
					if (at < 0 || at >= size) {
						throw new IndexOutOfBoundsException("at = " + at + ", size = " + size());
					}
					IntList.this.set(at + shift, value);
				}

				public IntList compute() {
					return new IntArrayList(this);
				}
			};
		}

	}

	static interface IntReversableCollection extends IntCollection {
	}

	static interface IntStream extends Iterable<Integer>, Comparable<IntStream> {
		public IntIterator intIterator();

		default public Iterator<Integer> iterator() {
			return new Iterator<Integer>() {
				private IntIterator it = intIterator();

				public boolean hasNext() {
					return it.isValid();
				}

				public Integer next() {
					int result = it.value();
					it.advance();
					return result;
				}
			};
		}

		default public int compareTo(IntStream c) {
			IntIterator it = intIterator();
			IntIterator jt = c.intIterator();
			while (it.isValid() && jt.isValid()) {
				int i = it.value();
				int j = jt.value();
				if (i < j) {
					return -1;
				} else if (i > j) {
					return 1;
				}
				it.advance();
				jt.advance();
			}
			if (it.isValid()) {
				return 1;
			}
			if (jt.isValid()) {
				return -1;
			}
			return 0;
		}

	}

	static class OutputWriter {
		private final PrintWriter writer;

		public OutputWriter(OutputStream outputStream) {
			writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
		}

		public OutputWriter(Writer writer) {
			this.writer = new PrintWriter(writer);
		}

		public void close() {
			writer.close();
		}

		public void printLine(int i) {
			writer.println(i);
		}

	}

	static class ArrayUtils {
		public static int[] sort(int[] array) {
			return sort(array, IntComparator.DEFAULT);
		}

		public static int[] sort(int[] array, IntComparator comparator) {
			return sort(array, 0, array.length, comparator);
		}

		public static int[] sort(int[] array, int from, int to, IntComparator comparator) {
			if (from == 0 && to == array.length)
				new IntArray(array).sort(comparator);
			else
				new IntArray(array).subList(from, to).sort(comparator);
			return array;
		}

	}

	static class IntArray extends IntAbstractStream implements IntList {
		private int[] data;

		public IntArray(int[] arr) {
			data = arr;
		}

		public int size() {
			return data.length;
		}

		public int get(int at) {
			return data[at];
		}

		public void addAt(int index, int value) {
			throw new UnsupportedOperationException();
		}

		public void removeAt(int index) {
			throw new UnsupportedOperationException();
		}

		public void set(int index, int value) {
			data[index] = value;
		}

	}

	static class InputReader {
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int readInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return isWhitespace(c);
		}

		public static boolean isWhitespace(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);

		}

	}

	static class Sorter {
		private static final int INSERTION_THRESHOLD = 16;

		private Sorter() {
		}

		public static void sort(IntList list, IntComparator comparator) {
			quickSort(list, 0, list.size() - 1, (Integer.bitCount(Integer.highestOneBit(list.size()) - 1) * 5) >> 1, comparator);
		}

		private static void quickSort(IntList list, int from, int to, int remaining, IntComparator comparator) {
			if (to - from < INSERTION_THRESHOLD) {
				insertionSort(list, from, to, comparator);
				return;
			}
			if (remaining == 0) {
				heapSort(list, from, to, comparator);
				return;
			}
			remaining--;
			int pivotIndex = (from + to) >> 1;
			int pivot = list.get(pivotIndex);
			list.swap(pivotIndex, to);
			int storeIndex = from;
			int equalIndex = to;
			for (int i = from; i < equalIndex; i++) {
				int value = comparator.compare(list.get(i), pivot);
				if (value < 0) {
					list.swap(storeIndex++, i);
				} else if (value == 0) {
					list.swap(--equalIndex, i--);
				}
			}
			quickSort(list, from, storeIndex - 1, remaining, comparator);
			for (int i = equalIndex; i <= to; i++) {
				list.swap(storeIndex++, i);
			}
			quickSort(list, storeIndex, to, remaining, comparator);
		}

		private static void heapSort(IntList list, int from, int to, IntComparator comparator) {
			for (int i = (to + from - 1) >> 1; i >= from; i--) {
				siftDown(list, i, to, comparator, from);
			}
			for (int i = to; i > from; i--) {
				list.swap(from, i);
				siftDown(list, from, i - 1, comparator, from);
			}
		}

		private static void siftDown(IntList list, int start, int end, IntComparator comparator, int delta) {
			int value = list.get(start);
			while (true) {
				int child = ((start - delta) << 1) + 1 + delta;
				if (child > end) {
					return;
				}
				int childValue = list.get(child);
				if (child + 1 <= end) {
					int otherValue = list.get(child + 1);
					if (comparator.compare(otherValue, childValue) > 0) {
						child++;
						childValue = otherValue;
					}
				}
				if (comparator.compare(value, childValue) >= 0) {
					return;
				}
				list.swap(start, child);
				start = child;
			}
		}

		private static void insertionSort(IntList list, int from, int to, IntComparator comparator) {
			for (int i = from + 1; i <= to; i++) {
				int value = list.get(i);
				for (int j = i - 1; j >= from; j--) {
					if (comparator.compare(list.get(j), value) <= 0) {
						break;
					}
					list.swap(j, j + 1);
				}
			}
		}

	}
}

