#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<double> v(n);
  for (long long i = 0; i < (n); i++) cin >> v[i];
  vector<double> t1(100009);
  int le = n / 2;
  if (n % 2) le++;
  for (long long i = 0; i < (le); i++) {
    int x = v[i] - i;
    if (x > 0) {
      t1[x]++;
    }
  }
  for (int i = n - 1; i >= le; i--) {
    int x = v[i] - (n - 1 - i);
    if (x > 0) {
      t1[x]++;
    }
  }
  int mx = 0, f = 1;
  for (long long i = 0; i < (100009); i++) {
    if (t1[i] > mx) {
      mx = t1[i];
      f = i;
    }
  }
  int ans = 0;
  if (v[0] != f) ans++;
  if (v[n - 1] != f) ans++;
  v[0] = f;
  v[n - 1] = f;
  for (long long i = 0; i < (le); i++) {
    if (i) {
      if (v[i] != v[i - 1] + 1) ans++;
      v[i] = v[i - 1] + 1;
    }
  }
  for (int i = n - 2; i >= le; i--) {
    if (v[i] != v[i + 1] + 1) ans++;
    v[i] = v[i + 1] + 1;
  }
  cout << ans;
  return 0;
}
