#include <bits/stdc++.h>
using namespace std;
int c[100005], a[100005];
int main(void) {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  for (int i = 0, j = n - 1; i <= j; i++, j--) {
    if (a[i] > i) c[a[i] - i]++;
    if (j != i && a[j] > i) c[a[j] - i]++;
  }
  printf("%d\n", n - *max_element(c, c + 100001));
  return 0;
}
