local function reada(n,m)m=m or 1 r={}for i=1,m do r[i]={}end for i=1,n do for j=1,m do r[j][i]=io.read"*n"end end return unpack(r)end
N=io.read"*n"
B=reada(N-1)
s=0
b=B[N-1]
for i=N-1,1,-1 do
	b=math.min(b,B[i])
	s=s+b
end
print(s+B[1])