#include <bits/stdc++.h>
using namespace std;
bool isCorrect(vector<int> arr) {
  if (arr.size() == 1) return true;
  for (int i = 0; i < arr.size() / 2; i++) {
    if (arr[i] != arr[arr.size() - 1 - i]) return false;
  }
  if (arr.size() % 2 == 1) {
    if (arr[arr.size() / 2 + 1] - arr[arr.size() / 2] == 1)
      return true;
    else
      return false;
  }
  return true;
}
int main() {
  int N;
  cin >> N;
  vector<int> arr;
  map<int, int> count;
  map<int, int>::iterator it;
  for (int i = 0; i < N; i++) {
    int tmp;
    cin >> tmp;
    arr.push_back(tmp);
    if (i < N / 2) {
      count[tmp - i]++;
    } else {
      count[tmp - (N - i - 1)]++;
    }
  }
  int max = -1;
  for (map<int, int>::iterator it = count.begin(); it != count.end(); ++it) {
    if (it->first > 0 && it->second > max) max = it->second;
  }
  if (isCorrect(arr)) max = N;
  cout << N - max << endl;
}
