#include <bits/stdc++.h>
const long long mod = 139 + 7;
using namespace std;
long long a[1000005];
long long b[1000005];
int main() {
  long long i, j, k;
  long long pos = 0, pos2 = 0;
  ;
  long long n, maxn = 0, m, sum = 0, sum2 = 0, t;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    a[i] -= min(i, n - i + 1);
    if (a[i] >= 0) {
      b[a[i]]++;
      maxn = max(maxn, b[a[i]]);
    }
  }
  cout << n - maxn << endl;
}
