#include <bits/stdc++.h>
const int INF = (int)1e9 + 7;
const int N = (int)1e5 + 7;
const int MAXN = (int)5e5 + 228;
using namespace std;
int t[MAXN * 4][2], a[MAXN], n, b[MAXN];
void build(int v = 1, int l = 1, int r = n + n + n, bool isb = 0) {
  if (l == r) {
    if (!isb)
      t[v][0] = t[v][1] = a[l];
    else
      t[v][0] = t[v][1] = b[l];
    t[v][1] *= -1;
    return;
  }
  int mid = l + r >> 1;
  build(v + v, l, mid, isb);
  build(v + v + 1, mid + 1, r, isb);
  t[v][0] = max(t[v + v][0], t[v + v + 1][0]);
  t[v][1] = max(t[v + v][1], t[v + v + 1][1]);
}
int getMax(int l, int r, int type, int v = 1, int tl = 1, int tr = n + n + n) {
  if (l > tr || r < tl) return INT_MIN;
  if (l <= tl && r >= tr) return t[v][type];
  int mid = tl + tr >> 1;
  return max(getMax(l, r, type, v + v, tl, mid),
             getMax(l, r, type, v + v + 1, mid + 1, tr));
}
inline bool check(int l, int r) {
  if (getMax(l, r, 0) < l)
    return 1;
  else
    return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = n + 1; i <= n + n + n; ++i) a[i] = a[i - n];
  build();
  for (int i = 1; i <= n + n + n; ++i) {
    int l = 0, r = i;
    while (r - l > 1) {
      int mid = l + r >> 1;
      if ((getMax(mid, i - 1, 0) + 1 >> 1) > a[i])
        l = mid;
      else
        r = mid;
    }
    b[i] = l;
  }
  build(1, 1, n + n + n, 1);
  for (int i = 1; i <= n; ++i) {
    int l = i, r = i + 2 * n + 1;
    while (r - l > 1) {
      int mid = l + r >> 1;
      if (check(i, mid))
        l = mid;
      else
        r = mid;
    }
    if (l >= i + 2 * n) l = i - 2;
    cout << l - i + 1 << ' ';
  }
  return 0;
}
