lines = readlines.map{|line| line.split(' ').map(&:to_i)}
a=[]
a.push(lines[1][0])
for i in 1..lines[0][0]-2
  a.push([lines[1][i-1],lines[1][i]].min)
end
a.push(lines[1][lines[1][0]-1])
puts a.inject(:+)