function Main(input) {
  input = input.split("\n");
  const n = input[0];
  var tempBArray = input[1].split(" ");
  var BArray = [];
  var sum = 0;
  
  tempBArray.forEach(function(value) {
     BArray.push(Number(value));
  });

  for (var i = 0; i < n; i ++) {
    if (i === 0) {
      sum = sum + BArray[0];
    } else if (i === n-1) {
      sum = sum + BArray[n-2];
    } else {
      if (BArray[i - 1] < BArray[i]) {
        sum = sum + BArray[i - 1];
      } else {
        sum = sum + BArray[i];
      }
    }
  }

  console.log(sum);
  
  }
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
