import std.algorithm;
import std.array;
import std.container;
import std.conv;
import std.math;
import std.numeric;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

void scan(T...)(ref T a) {
    string[] ss = readln.split;
    foreach (i, t; T) a[i] = ss[i].to!t;
}
T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

void main() {
    int n; scan(n);
    auto b = readints;

    int ans = 0;
    for (int i = 0; i < n; i++) {
        if (i == 0) {
            ans += b[i];
        }
        else if (i == n - 1) {
            ans += b[i - 1];
        }
        else {
            ans += min(b[i - 1], b[i]);
        }
    }
    writeln(ans);
}
