#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long MOD = 998244353;
inline long long add(long long x, long long y) {
  x += y;
  if (x >= mod) x -= mod;
  return x;
}
inline long long sub(long long x, long long y) {
  x -= y;
  if (x < 0) x += mod;
  return x;
}
inline long long mul(long long x, long long y) { return (x * 1ll * y) % mod; }
mt19937 rng32(chrono::steady_clock::now().time_since_epoch().count());
signed main() {
  long long n;
  cin >> n;
  long long a[n + 1];
  for (long long i = 1; i <= n; i++) cin >> a[i];
  map<long long, long long> m;
  long long ma = 0;
  long long x;
  for (long long i = 1; i <= ceil(n / 2.0); i++) {
    x = a[i] - i + 1;
    m[x]++;
    if (x > 0) ma = max(ma, m[x]);
  }
  for (long long i = ceil(n / 2.0) + 1; i <= n; i++) {
    x = a[i] - (n - i);
    m[x]++;
    if (x > 0) ma = max(m[x], ma);
  }
  cout << n - ma << endl;
  return 0;
}
