function Main(input){
  var N = input.split("\n")[0];
  var B = input.split("\n")[1].split(" ");


  var count = 0;
  for(i=0;i<=(N-2);i++){
    B[i] = parseInt(B[i],10);
    if(i===0){
      count += 2*B[i];
    }else{
      if(B[i-1]>B[i]){
        count -= B[i-1];
        count += 2*B[i];
      }else{
        count += B[i];
      }
    }
  }
  console.log(count);
}  

Main(require("fs").readFileSync("/dev/stdin", "utf8"));