#include <bits/stdc++.h>
using namespace std;
const int N = 1000010;
int n;
int a[N];
map<int, int> wys;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < (n); ++i) scanf("%d", &a[i]);
  for (int i = 0; i < ((n + 1) / 2); ++i) {
    if (a[i] - i > 0) wys[a[i] - i]++;
    if ((n - 1 - i) != i && a[n - i - 1] - i > 0) wys[a[n - i - 1] - i]++;
  }
  int najw = 0;
  for (typeof((wys).begin()) p = ((wys).begin()); p != (wys).end(); ++p)
    if (p->second > najw) najw = p->second;
  printf("%d\n", n - najw);
}
