#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
const long long int inf = 9e18;
const long double pi = 2 * acos(0.0);
using namespace std;
long long int power(long long int a, long long int n) {
  if (n == 0) {
    return 1;
  }
  long long int p = power(a, n / 2) % 1000000007;
  p = (p * p) % 1000000007;
  if (n % 2 == 1) {
    p = (p * a) % 1000000007;
  }
  return p;
}
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
const int N = 2e6 + 5;
vector<long long int> sieve(N + 1, 0);
void si() {
  sieve[1] = 1;
  for (long long int i = 2; i < N; i++) {
    if (sieve[i] == 0) {
      for (long long int j = i; j < N; j += i) {
        sieve[j] = i;
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  vector<long long int> a(n);
  ;
  for (long long int i = 0; i < n; i++) cin >> a[i];
  ;
  vector<long long int> ind(3 * n, 3 * n);
  vector<long long int> b(3 * n);
  for (int i = 0; i < n; i++) {
    b[i] = a[i];
    b[i + n] = a[i];
    b[i + 2 * n] = a[i];
  }
  multiset<pair<long long int, long long int>,
           greater<pair<long long int, long long int> > >
      s;
  s.insert(make_pair(b[0], 0));
  for (int i = 1; i < 3 * n; i++) {
    if ((int)(s.size()) == 0) {
      s.insert(make_pair(b[i], i));
    }
    while ((int)(s.size()) > 0) {
      pair<long long int, long long int> p = *(s.begin());
      long long int x = p.first;
      long long int in = p.second;
      if (x % 2 == 0 && b[i] < x / 2) {
        ind[in] = i;
      } else if (x % 2 == 1 && b[i] <= (x - 1) / 2) {
        ind[in] = i;
      } else {
        break;
      }
      s.erase(s.begin());
    }
    s.insert(make_pair(b[i], i));
  }
  long long int mini = 1e9;
  for (int i = 3 * n - 1; i >= 0; i--) {
    ind[i] = min(ind[i], mini);
    mini = min(ind[i], mini);
  }
  vector<long long int> ans(n);
  for (int i = 0; i < n; i++) {
    if (ind[i] == 3 * n) {
      ans[i] = -1;
    } else {
      ans[i] = ind[i] - i;
    }
  };
  for (long long int i = 0; i < n; i++) cout << ans[i] << " ";
  ;
  cout << "\n";
  return 0;
}
