#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

typedef long long ll;

ll a[200005];
ll dp[200005][16];
ll dp2[200005][16];

int main() {
  int n;
  cin >> n;
  for(int i = 0; i < n; i++) cin >> a[i];

  for(int i = 0; i <= 15; i++) {
    dp[n-1][i] = i;
    dp2[0][i] = i;
  }

  for(ll i = n - 2; i >= 0; i--) {
    for(ll j = 0; j <= 15; j++) {
      ll x = 1ll << (2 * j);
      ll k = 0;
      ll tmp = 1;
      while(a[i] * x > a[i+1] * tmp) {
	tmp *= 4;
	k++;
      }
      if(k <= 15) {
	dp[i][j] = dp[i+1][k] + j;
      }
      else {
	dp[i][j] = dp[i+1][15] + (n-i-1) * (k-15) + j;
      }
    }
  }


  for(ll i = 1; i < n; i++) {
    for(ll j = 0; j <= 15; j++) {
      ll x = 1ll << (2 * j);
      ll k = 0;
      ll tmp = 1;
      while(a[i-1] * tmp < a[i] * x) {
	tmp *= 4;
	k++;
      }
      if(k <= 15) {
	dp2[i][j] = dp2[i-1][k] + j;
      }
      else {
	dp2[i][j] = dp2[i-1][15] + i * (k-15) + j;
      }
    }
  }
  ll ans = dp[0][0] * 2;
  for(int i = 1; i < n; i++) {
    ans = min(ans,dp2[i-1][0] * 2 + i + dp[i][0] * 2);
  }
  cout << min(ans,dp2[n-1][0] * 2 + n) << endl;
}
  
  
