#include <bits/stdc++.h>
using namespace std;
int main() {
  int C, manzoku;
  vector<int> a(C);
  vector<int> b(C);
  vector<int> c(C - 1);
  for (int i = 0; i < C; i++) {
    manzoku += b.at(a.at(i));
  }
  for (int i = 2; i < C; i++) {
    if (a.at(i) - a.at(i - 1) == 1) {
      manzoku += c.at(i - 1);
    }
  }
}
