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