#include <bits/stdc++.h>
using namespace std;
int n, a[100010], k, r = -1;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> k;
    k = max(k - i, k - n + i + 1);
    if (k > 0) a[k]++;
  }
  for (int i = 0; i < 100001; i++) r = max(r, a[i]);
  cout << n - r;
  return 0;
}
