n = gets.to_i
a = gets.split.map(&:to_i)

if n==1
  p 0
  exit
end

#ぷらす
s = Array.new(n, 0)
#直前が反転したときに吸収できる数
w = Array.new(n, 0)

(n-1).times{|i|
  tmp = a[i+1]
  while tmp<a[i]
    s[i+1] += 2
    tmp *= 4
  end
  tmp = a[i]
  while tmp*4<=a[i+1]
    w[i] += 2
    tmp *= 4
  end
}

b = a.map{|t|t*-2}.reverse
#まいなす
t = Array.new(n, 0)
(n-1).times{|i|
  tmp = b[i]
  while tmp>b[i+1]
    t[i+1] += 2
    tmp *= 4
  end
}

#累積和
(n-1).times{|i|
  s[i+1] += s[i]
  w[i+1] += w[i]
  t[i+1] += t[i]
}

min = (n-1) + t[-1]
(n-1).times{|i|
  ans = i + (s[-1]-s[i]) + (t[i]-t[0]) - (w[i]-w[0])
  min = ans if min > ans
}

p min