Sonya decided that having her own hotel business is the best way of earning money because she can profit and rest wherever she wants.

The country where Sonya lives is an endless line. There is a city in each integer coordinate on this line. She has n hotels, where the i-th hotel is located in the city with coordinate x_i. Sonya is a smart girl, so she does not open two or more hotels in the same city.

Sonya understands that her business needs to be expanded by opening new hotels, so she decides to build one more. She wants to make the minimum distance from this hotel to all others to be equal to d. The girl understands that there are many possible locations to construct such a hotel. Thus she wants to know the number of possible coordinates of the cities where she can build a new hotel. 

Because Sonya is lounging in a jacuzzi in one of her hotels, she is asking you to find the number of cities where she can build a new hotel so that the minimum distance from the original n hotels to the new one is equal to d.

Input

The first line contains two integers n and d (1≤ n≤ 100, 1≤ d≤ 10^9) — the number of Sonya's hotels and the needed minimum distance from a new hotel to all others.

The second line contains n different integers in strictly increasing order x_1, x_2, …, x_n (-10^9≤ x_i≤ 10^9) — coordinates of Sonya's hotels.

Output

Print the number of cities where Sonya can build a new hotel so that the minimum distance from this hotel to all others is equal to d.

Examples

Input

4 3
-3 2 9 16


Output

6


Input

5 2
4 8 11 18 19


Output

5

Note

In the first example, there are 6 possible cities where Sonya can build a hotel. These cities have coordinates -6, 5, 6, 12, 13, and 19.

In the second example, there are 5 possible cities where Sonya can build a hotel. These cities have coordinates 2, 6, 13, 16, and 21.
			import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.TreeMap;
import java.util.TreeSet;
				public class Main implements Runnable
				{
					static final long MOD = 1000000007L;
					static final long MOD2 = 1000000009L;
					static class InputReader
					{
						private InputStream stream;
						private byte[] buf = new byte[1024];
						private int curChar;
						private int numChars;
						private SpaceCharFilter filter;
						private BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
				 
						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 String nextLine()
						{
							String str = "";
				            try
				            {
				                str = br.readLine();
				            }
				            catch (IOException e)
				            {
				                e.printStackTrace();
				            }
				            return str;
						}
						public int nextInt()
						{
							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 long nextLong() 
						{
							int c = read();
							while (isSpaceChar(c))
								c = read();
							int sgn = 1;
							if (c == '-') 
							{
								sgn = -1;
								c = read();
							}
							long 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 double nextDouble() 
						{
							int c = read();
							while (isSpaceChar(c))
								c = read();
							int sgn = 1;
							if (c == '-') 
							{
								sgn = -1;
								c = read();
							}
							double res = 0;
							while (!isSpaceChar(c) && c != '.') 
							{
								if (c == 'e' || c == 'E')
									return res * Math.pow(10, nextInt());
								if (c < '0' || c > '9')
									throw new InputMismatchException();
								res *= 10;
								res += c - '0';
								c = read();
							}
							if (c == '.') 
							{
								c = read();
								double m = 1;
								while (!isSpaceChar(c)) 
								{
									if (c == 'e' || c == 'E')
										return res * Math.pow(10, nextInt());
									if (c < '0' || c > '9')
										throw new InputMismatchException();
									m /= 10;
									res += (c - '0') * m;
									c = read();
								}
							}
							return res * sgn;
						}
						
						public String readString() 
						{
							int c = read();
							while (isSpaceChar(c))
								c = read();
							StringBuilder res = new StringBuilder();
							do 
							{
								res.appendCodePoint(c);
								c = read();
							} 
							while (!isSpaceChar(c));
							
							return res.toString();
						}
					 
						public boolean isSpaceChar(int c) 
						{
							if (filter != null)
								return filter.isSpaceChar(c);
							return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
						}
					 
						public String next() 
						{
							return readString();
						}
						
						public interface SpaceCharFilter 
						{
							public boolean isSpaceChar(int ch);
						}
					}
				 	
					public static void main(String args[]) throws Exception
					{
						new Thread(null, new Main(),"Main",1<<26).start();
					}
					int MAXN = 100001;
					ArrayList<Integer> adj[];
					int V;
					
					public void run() 
					{
						InputReader sc= new InputReader(System.in);
						PrintWriter w= new PrintWriter(System.out);
						int n = sc.nextInt();
						int d = sc.nextInt();
						int[] arr=  new int[n];
						int count = 0;
						int max = Integer.MIN_VALUE;
						for(int i = 0;i < n;i++) {
							arr[i]  =sc.nextInt();
						}
						if(n == 1) {
							w.println("2");
							w.close();
							System.exit(0);
						}
						TreeSet<Integer> tset = new TreeSet();
						for(int i = 0;i < n;i++) {
							int one = arr[i] - d;
							int two = arr[i] + d;
							if(i == 0) {
								tset.add(one);
								if(arr[i+1] - two >= d) {
									tset.add(two);
								}
							}else if(i == n-1) {
								tset.add(two);
								if(one - arr[i-1] >= d) {
									tset.add(one);
								}
							}else {
								if(one - arr[i-1] >= d) {
									tset.add(one);
								}if(arr[i+1] - two >= d) {
									tset.add(two);
								}
							}
						}
						w.println(tset.size());
						w.close();
					}
					
					boolean function(int val,int[] arr) {
						TreeSet<Integer> tset = new TreeSet();
						for(int i = 0;i < arr.length;i++) {
							if(arr[i] != val) {
								int dif = arr[i] - val;
								if(dif < 0) {
									tset.add(-(dif));
								}else {
									tset.add(dif);
								}
							}
						}
						if(tset.size() == 1) {
							return true;
						}else {
							return false;
						}
					}
					int[] segTree;
					int[] arr;
					void update(int l,int r,int ind,int pos) {
						if(ind < l || r < ind) {
							return;
						}
						if(l == r) {
							arr[ind] += 1;
							segTree[pos] += 1;
							return;
						}
						int mid = (l + r)/2;
						update(l, mid,ind, 2*pos+1);
						update(mid+1, r,ind,2*pos+2);
						segTree[pos] = segTree[2*pos+1] + segTree[2*pos+2];
					}
					int query(int pos, int l, int r, int start, int end)
					{
					    if(end < l || r < start)
					    {
					        return 0;
					    }
					    if(start <= l && r <= end)
					    {
					        // range represented by a node is completely inside the given range
					        return segTree[pos];
					    }
					    // range represented by a node is partially inside and partially outside the given range
					    int mid = (l + r) / 2;
					    int p1 = query(2*pos + 1, l, mid, start, end);
					    int p2 = query(2*pos+2, mid+1, r, start, end);
					    return p1 + p2;
					}
					
					static class Temp implements Comparable<Temp>{
						int a;
						int b;
						Temp(int a,int b){
							this.a = a;
							this.b = b;
						}
						@Override
						public int compareTo(Temp t){
							if(this.a == t.a) {
								return Integer.compare(this.b,t.b);
							}
							return Integer.compare(this.a,t.a);
						}
					}
					static class Pair implements Comparable<Pair>{
						int first;
						int max;
						int second;
						int val1;
						int val2;
						boolean whole;
						
						Pair (int a,int b,int c,int val1,int val2,boolean whole){
							this.first = a;
							this.max = b;
							this.second = c;
							this.val1= val1;
							this.val2 = val2;
							this.whole = whole;
						}
						Pair(){
							
						}
						public boolean equals(Object o)
						{
							Pair p = (Pair)o;
							return (p.first==first && p.max==max) || (p.first == max && p.first == max);
						}
						public int hashCode()
						{
							return new Long(first).hashCode()*31 + new Long(max).hashCode();
						}
						public int compareTo(Pair p){
							return Long.compare(p.first,this.first);
						}
					}
				
				}