#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int arr[n + 1];
  for (int i = 1; i <= n; i++) cin >> arr[i];
  map<int, int> mapp;
  int maxm = 0;
  int x;
  for (int i = 1; i <= ceil(n / 2.0); i++) {
    x = arr[i] - i + 1;
    mapp[x]++;
    if (x > 0) maxm = max(maxm, mapp[x]);
  }
  for (int i = ceil(n / 2.0) + 1; i <= n; i++) {
    x = arr[i] - (n - i);
    mapp[x]++;
    if (x > 0) maxm = max(mapp[x], maxm);
  }
  cout << n - maxm << "\n";
  return 0;
}
