Anastasia loves going for a walk in Central Uzhlyandian Park. But she became uninterested in simple walking, so she began to collect Uzhlyandian pebbles. At first, she decided to collect all the pebbles she could find in the park.

She has only two pockets. She can put at most k pebbles in each pocket at the same time. There are n different pebble types in the park, and there are wi pebbles of the i-th type. Anastasia is very responsible, so she never mixes pebbles of different types in same pocket. However, she can put different kinds of pebbles in different pockets at the same time. Unfortunately, she can't spend all her time collecting pebbles, so she can collect pebbles from the park only once a day.

Help her to find the minimum number of days needed to collect all the pebbles of Uzhlyandian Central Park, taking into consideration that Anastasia can't place pebbles of different types in same pocket.

Input

The first line contains two integers n and k (1 ≤ n ≤ 105, 1 ≤ k ≤ 109) — the number of different pebble types and number of pebbles Anastasia can place in one pocket.

The second line contains n integers w1, w2, ..., wn (1 ≤ wi ≤ 104) — number of pebbles of each type. 

Output

The only line of output contains one integer — the minimum number of days Anastasia needs to collect all the pebbles.

Examples

Input

3 2
2 3 4


Output

3


Input

5 4
3 1 8 9 7


Output

5

Note

In the first sample case, Anastasia can collect all pebbles of the first type on the first day, of second type — on the second day, and of third type — on the third day.

Optimal sequence of actions in the second sample case: 

  * In the first day Anastasia collects 8 pebbles of the third type. 
  * In the second day she collects 8 pebbles of the fourth type. 
  * In the third day she collects 3 pebbles of the first type and 1 pebble of the fourth type. 
  * In the fourth day she collects 7 pebbles of the fifth type. 
  * In the fifth day she collects 1 pebble of the second type. 
import java.io.*;
import java.util.*;
@SuppressWarnings("unused")
public class Main { //Название класса здесь
	private static boolean IOTypeIsFile = false; //Вид ввода/вывода. true-через файл. false-через консоль.
	private static String FileInput = ""; //Название файла ввода
	private static String FileOutput = "";//Название файла вывода
	private static Scanner in;
	private static PrintStream out, err;

	private static String ts(Object a) {
		return String.valueOf(a);
	}

	private static int ti(String a) {
		return Integer.valueOf(a);
	}

	private static double td(String a) {
		return Double.valueOf(a);
	}

	private static int[] arrayI(int n) {
		int[] ans = new int[n];
		for (int i = 0; i < n; ++i) {
			ans[i] = in.nextInt();
		}
		return ans;
	}

	private static String[] arrayS(int n) {
		String[] ans = new String[n];
		for (int i = 0; i < n; ++i) {
			ans[i] = in.next();
		}
		return ans;
	}

	private static double[] arrayD(int n) {
		double[] ans = new double[n];
		for (int i = 0; i < n; ++i) {
			ans[i] = in.nextDouble();
		}
		return ans;
	}

	private static void SomeVeryLargeUndUselessFunctionName() {
		if (!IOTypeIsFile) {
			err.print(FileInput + FileOutput);
		}
	}

	public static void main(String[] args) {
		err = new PrintStream(System.err);
		if (IOTypeIsFile) {
			File f = new File(FileInput);
			try {
				in = new Scanner(f);
				out = new PrintStream(FileOutput);
			} catch (FileNotFoundException var3) {
				System.err.println("404");
			}
		} else {
			in = new Scanner(System.in);
			out = new PrintStream(System.out);
		}
		run();
		in.close();
		out.close();
	}
	//Код пишут отсюда
	private static void run() {
		int n=in.nextInt(),k=in.nextInt(),ans=1;
		boolean u=false;
		for (;n>0;n--) {
			int w=in.nextInt();
			while (true) {
				if (w<=k) {
					if (u) {
						u=false;
						if (n>1) {ans++;}
					} else {u=true;}
					break;
				} else if (!(u)&&(w<=2*k)) {
					if (n>1){ans++;}
					break;
				} else {
					w-=k+((u)?0:k);
					ans++;
					u=false;
				}
			}
		}
		out.println(ans);
	}
}