_,b=open(0);*b,=list(map(int,b.split()));print((b[0]+sum(min(t)for t in zip(b,b[1:]))+b[-1]))
_,b=open(0);*b,=list(map(int,b.split()));print((b[0]+sum(map(min,list(zip(b,b[1:]))))+b[-1]))
_, b = open(0)
(*b,) = list(map(int, b.split()))
print((b[0] + sum(min(t) for t in zip(b, b[1:])) + b[-1]))

_, b = open(0)
(*b,) = list(map(int, b.split()))
print((b[0] + sum(map(min, list(zip(b, b[1:])))) + b[-1]))

-print((b[0] + sum(min(t) for t in zip(b, b[1:])) + b[-1])) +print((b[0] + sum(map(min, list(zip(b, b[1:])))) + b[-1]))