#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <string>
using namespace std;
int main(){
int N, next, now = 0, ans = 0;
scanf("%d", &N);
for(int i = 0; i < N; i++){
scanf("%d", &next);
if(next >= now) ans += (next - now) * 6 + 5;
else ans += (now - next) * 4 + 5;
now = next;
}
printf("%d\n", ans);
return 0;
}