Squirrel Liss loves nuts. There are n trees (numbered 1 to n from west to east) along a street and there is a delicious nut on the top of each tree. The height of the tree i is hi. Liss wants to eat all nuts.

Now Liss is on the root of the tree with the number 1. In one second Liss can perform one of the following actions:

  * Walk up or down one unit on a tree. 
  * Eat a nut on the top of the current tree. 
  * Jump to the next tree. In this action the height of Liss doesn't change. More formally, when Liss is at height h of the tree i (1 ≤ i ≤ n - 1), she jumps to height h of the tree i + 1. This action can't be performed if h > hi + 1. 



Compute the minimal time (in seconds) required to eat all nuts.

Input

The first line contains an integer n (1 ≤ n ≤ 105) — the number of trees.

Next n lines contains the height of trees: i-th line contains an integer hi (1 ≤ hi ≤ 104) — the height of the tree with the number i.

Output

Print a single integer — the minimal time required to eat all nuts in seconds.

Examples

Input

2
1
2


Output

5


Input

5
2
1
2
1
1


Output

14
#include <bits/stdc++.h>
using namespace std;
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << "\t";
    return *this;
  }
} dbg;
template <class T>
void setmax(T& a, T b) {
  if (a < b) a = b;
}
template <class T>
void setmin(T& a, T b) {
  if (b < a) a = b;
}
template <class T>
T Abs(T x) {
  return x > 0 ? x : -x;
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
template <class T>
inline T Mod(T n, T m) {
  return (n % m + m) % m;
}
template <class T>
string toString(T n) {
  ostringstream oss;
  oss << n;
  oss.flush();
  return oss.str();
}
int toInt(string s) {
  int r = 0;
  istringstream sin(s);
  sin >> r;
  return r;
}
bool isVowel(char ch) {
  ch = tolower(ch);
  if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u')
    return true;
  return false;
}
bool isUpper(char c) { return c >= 'A' && c <= 'Z'; }
bool isLower(char c) { return c >= 'a' && c <= 'z'; }
long long Pow(long long B, long long P) {
  long long R = 1;
  while (P > 0) {
    if (P % 2 == 1) R = (R * B);
    P /= 2;
    B = (B * B);
  }
  return R;
}
int BigMod(long long B, long long P, long long M) {
  long long R = 1;
  while (P > 0) {
    if (P % 2 == 1) {
      R = (R * B) % M;
    }
    P /= 2;
    B = (B * B) % M;
  }
  return (int)R;
}
void binprint(long long mask, long long n) {
  long long i;
  string s = "";
  do {
    s += (mask % 2 + '0');
    mask /= 2;
  } while (mask);
  reverse(s.begin(), s.end());
  s = string(max(n - (int)s.size(), 0LL), '0') + s;
  for (i = (int)s.size() - n; i < (int)s.size(); i++) printf("%c", s[i]);
  printf("\n");
}
void ASCII_Chart() {
  int i, j, k;
  printf("ASCII Chart:(30-129)\n");
  for (i = 30; i < 50; i++) {
    for (j = 0; j < 5; j++) {
      k = i + j * 20;
      printf("%3d---> '%c'   ", k, k);
    }
    printf("\n");
  }
}
int DSUM(int v) {
  int sum = 0;
  while (v) {
    sum += v % 10;
    v /= 10;
  }
  return sum;
}
int a[1000006], b[1000006];
char ch;
double aa, bb;
long long ans, mx, mn, u, v, x, y, n, m, cnt, sum;
map<int, int> mp, mp1;
set<int> ST;
vector<int> VC, VD, VB;
void input(int t) {
  int i;
  for (i = 0; i < t; i++) cin >> a[i];
}
void output(int t) {
  int i;
  for (i = 0; i < t; i++) cout << b[i] << " ";
}
string s, s1, str;
int main() {
  long long i, j, test, Case = 1, k = 0, idx, mx, tmp, x, xx;
  while (cin >> u) {
    for (i = 0; i < u; i++) cin >> a[i];
    mx = a[0];
    k = a[0];
    for (i = 1; i < u; i++) {
      if (a[i] > mx)
        k += a[i] - mx + 2;
      else
        k += mx - a[i] + 2;
      mx = a[i];
    }
    cout << k + 1 << endl;
    ;
  }
  return 0;
}
