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
'''
def main():
    from sys import stdin,stdout
if __name__=='__main__':
    main()
'''
#401
'''
def main():
    import sys
    a,b=map(int,sys.stdin.readline().split())
    if a>b:
        if a-b==1:
            s=''
            for i in range(a+b):
                if i&1:
                    s+='1'
                else:
                    s+='0'
        else:
            s='-1'
    elif b>a:
        if b<=2*(a+1):
            s=''
            if b-a==1:
                for i in range(a+b):
                    if i&1:
                        s+='0'
                    else:
                        s+='1'
            else:
                n=b-a-1
                i=0
                flag=0
                while i<a+b:
                    if flag&1:
                        s+='0'
                    else:
                        if n:
                            s+='11'
                            n-=1
                            i+=1
                        else:
                            s+='1'
                    i+=1
                    flag=~flag
        else:
            s='-1'
    else:
        s=''
        for i in range(a+b):
            if i&1:
                s+='1'
            else:
                s+='0'
    sys.stdout.write(s)
if __name__=='__main__':
    main()
'''
#508B
'''
def main():
    import sys
    n=sys.stdin.readline().strip()
    lodd=int(n[-1])
    odd=0
    even=0
    s=''
    j=0
    for i in n:
        if ord(i)&1:
            odd+=1
        else:
            even+=1
            feven=int(i)
            feindex=j
            if(feven<lodd):
                break
        j+=1
    if even:
        for i in range(len(n)):
            if i==feindex:
                sys.stdout.write(n[-1])
            elif i==len(n)-1:
                sys.stdout.write(str(feven))
            else:
                sys.stdout.write(n[i])
    else:
        sys.stdout.write('-1')
if __name__=='__main__':
    main()
'''
#447B
'''
def main():
    import sys
    s=sys.stdin.readline().strip()
    n=int(sys.stdin.readline())
    tup=tuple(map(int,sys.stdin.readline().split()))
    maxim=max(tup)
    score=0
    for i in range(len(s)):
        score+=(i+1)*tup[ord(s[i])-97]
    d=n*(2*len(s)+n+1)//2
    score+=maxim*d
    sys.stdout.write(str(score))
if __name__=='__main__':
    main()
'''
#507B
'''
def main():
    from sys import stdin,stdout
    from math import ceil,sqrt
    def sqr(a):
        return a*a
    r,x,y,a,b=map(int,stdin.readline().split())
    mid=((x+a)/2,(y+b)/2)
    #print(mid)
    dis=sqrt(sqr(x-mid[0])+sqr(y-mid[1]))
    #print(dis)
    n=ceil(dis/r)
    stdout.write(str(n)+'\n')
if __name__=='__main__':
    main()
'''
#454B
#SORT BY SHIFT
'''
def main():
    from sys import stdin,stdout
    n=int(stdin.readline())
    tup=tuple(map(int,stdin.readline().split()))
    minim=min(tup)
    maxim=max(tup)
    maximindex=tup.index(maxim)
    flag=1
    i=0
    pv=tup[-1]
    while i<n:
        if tup[i]<pv:
            if tup[i]==minim and pv==maxim:
                l=i+1
                while l<max(maximindex,n):
                    if tup[l]<tup[l-1]:
                        flag=0
                        break
                    l+=1
                break
            else:
                flag=0
                break
        pv=tup[i]
        i+=1
    #print(i)
    if flag:
        if i:
            stdout.write(str(n-i))
        else:
            stdout.write('0')
    else:
        stdout.write('-1')
if __name__=='__main__':
    main()
'''
#450B
'''
def main():
    from sys import stdin,stdout
    MOD=int(1e9)+7
    x,y=map(int,stdin.readline().split())
    n=(int(stdin.readline())-1)%6
    tup=(x,y,y-x,-x,-y,x-y)
    stdout.write(str(tup[n]%MOD))
if __name__=='__main__':
    main()
'''
#265B
def main():
    from sys import stdin,stdout
    n=int(stdin.readline())
    ksum=n
    for i in range(n):
        x=int(stdin.readline())
        if i:
            if x<p:
                ksum+=1+(p-x)
                p=x
            else:
                ksum+=(1+x-p)
                p=x
        else:
            ksum+=x
            p=x
    stdout.write(str(ksum))
if __name__=='__main__':
    main()
