#include <bits/stdc++.h>
using namespace std;
string s;
vector<long long> prim;
set<long long> prim2;
void primeFactors(int n) {
  while (n % 2 == 0) {
    prim.push_back(2);
    prim2.insert(2);
    n = n / 2;
  }
  for (int i = 3; i <= sqrt(n); i = i + 2) {
    while (n % i == 0) {
      prim.push_back(i);
      prim2.insert(i);
      n = n / i;
    }
  }
  if (n > 2) {
    prim.push_back(n);
    prim2.insert(n);
  }
}
long long dp[10005][27];
long long a[100000], b[100000];
map<long long, long long> c;
void func() {
  long long n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long m = 0;
  for (int i = 0; i < n; i++) {
    if (i < n / 2) {
      b[i] = a[i] - i;
    } else {
      b[i] = a[i] + i - n + 1;
    }
    if (b[i] > 0) {
      c[b[i]]++;
      m = max(m, c[b[i]]);
    }
  }
  cout << n - m;
}
int main() {
  {
    ios ::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
  }
  { func(); }
  return 0;
}
