#include <bits/stdc++.h>
using i64 = long long;

i64 dp[200010][20];
i64 dp2[200010][20];
int n;

i64 get(i64 l, i64 x) {
    if (x < 15) return dp[l][x];
    return dp[l][15] + (x - 15) * (n - l);
}

i64 get2(i64 l, i64 x) {
    if (x < 15) return dp2[l][x];
    return dp2[l][15] + (x - 15) * (l + 1);
}

int main() {
    std::cin >> n;
    std::vector<i64> a(n);
    for (int i = 0; i < n; i++) {
        std::cin >> a[i];
    }

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

    for (int l = n - 2; l >= 0; l--) {
        i64 cc = a[l];
        i64 dd = a[l + 1];
        for (int x = 0; x < 16; x++) {
            if (x) cc *= 4;
            i64 i = 0;
            while (cc > dd * (1ll << (2 * i))) i++;
            dp[l][x] = x + get(l + 1, i);
        }
    }

    for (int l = 1; l < n; l++) {
        i64 cc = a[l];
        i64 dd = a[l - 1];
        for (int x = 0; x < 16; x++) {
            if (x) cc *= 4;
            i64 i = 0;
            while (cc > dd * (1ll << (2 * i))) i++;
            dp2[l][x] = x + get2(l - 1, i);
        }
    }

    auto ret = 2 * get(0, 0);
    for (int i = 0; i < n - 1; i++) {
        // [0, i] are all negative
        auto curr = i + 1 + 2 * get2(i, 0) + 2 * get(i + 1, 0);
        ret = std::min(ret, curr);
    }
    ret = std::min(ret, 2 * get2(n - 1, 0) + n - 1);

    std::cout << ret << std::endl;

    return 0;
}