#include <bits/stdc++.h>
using namespace std;
template <class T, class U>
ostream& operator<<(ostream& out, const pair<T, U>& p) {
  return out << "(" << p.first << "," << p.second << ")";
}
template <class T>
ostream& operator<<(ostream& out, const vector<T>& p) {
  if (!((int)(p).size())) return out << "{}";
  out << "{ " << p[0];
  for (int i = (1); i < (((int)(p).size())); ++i) out << ", " << p[i];
  return out << "}";
}
template <class T, size_t N>
ostream& operator<<(ostream& out, const array<T, N>& p) {
  return out << vector<T>(begin(p), end(p));
}
template <class T>
ostream& operator<<(ostream& out, const deque<T>& p) {
  return out << vector<T>(begin(p), end(p));
}
template <class T>
ostream& operator<<(ostream& out, const queue<T>& p) {
  return out << vector<T>(begin(p), end(p));
}
template <class T, class U>
pair<T, U> operator+(const pair<T, U>& p1, const pair<T, U>& p2) {
  return {p1.first + p2.first, p1.second + p2.second};
}
template <class T, class U>
pair<T, U> operator-(const pair<T, U>& p1, const pair<T, U>& p2) {
  return {p1.first - p2.first, p1.second - p2.second};
}
template <class T, class U>
pair<T, U> operator-(const pair<T, U>& p) {
  return pair<int, int>{0, 0} - p;
}
template <class T, class U>
bool operator^(const pair<T, U>& p1, const pair<T, U>& p2) {
  return p1.first >= 0 && p1.first < p2.first && p1.second >= 0 &&
         p1.second < p2.second;
}
const int maxn = 300005;
int tracks[maxn];
int l[maxn];
int rmq[maxn][30];
int rmq2[maxn][30];
int query(int i, int j) {
  int k = l[j - i + 1];
  return min(rmq[i][k], rmq[j - (1 << k) + 1][k]);
}
int query2(int i, int j) {
  int k = l[j - i + 1];
  return min(rmq2[i][k], rmq2[j - (1 << k) + 1][k]);
}
int stop[maxn];
int main() {
  int n;
  cin >> n;
  for (int i = (0); i < (n); ++i) cin >> tracks[i];
  for (int i = (0); i < (n); ++i) tracks[i + n] = tracks[i];
  for (int i = (0); i < (n); ++i) tracks[i + 2 * n] = tracks[i];
  for (int i = (0); i < (n * 3); ++i) rmq[i][0] = tracks[i];
  for (int i = (1); i < (25); ++i) {
    for (int j = (0); j < (n * 3); ++j) {
      int p = j + (1 << (i - 1));
      if (p < n * 3)
        rmq[j][i] = min(rmq[j][i - 1], rmq[p][i - 1]);
      else
        rmq[j][i] = rmq[j][i - 1];
    }
  }
  l[1] = 0;
  for (int i = (2); i < (maxn); ++i) l[i] = l[i / 2] + 1;
  for (int i = (0); i < (n * 3); ++i) {
    int left = i;
    int right = n * 3;
    while (left < right) {
      int mid = (left + right + 1) / 2;
      int m = query(i, mid);
      if (m < (tracks[i] + 1) / 2)
        right = mid - 1;
      else
        left = mid;
    }
    stop[i] = left + 1;
  }
  for (int i = (0); i < (n * 3); ++i) rmq2[i][0] = stop[i];
  for (int i = (1); i < (25); ++i) {
    for (int j = (0); j < (n * 3); ++j) {
      int p = j + (1 << (i - 1));
      if (p < n * 3)
        rmq2[j][i] = min(rmq2[j][i - 1], rmq2[p][i - 1]);
      else
        rmq2[j][i] = rmq2[j][i - 1];
    }
  }
  for (int i = (0); i < (n); ++i) {
    int stopped = query2(i, stop[i]);
    if (min(stopped, stop[i]) == (n * 3 + 1))
      cout << -1 << " ";
    else
      cout << (min(stopped, stop[i]) - i) << " ";
  }
}
