n=int(input())d=sorted([*map(int,input().split())])l=d[0];s=1for i in d: if l*2<i:s+=1;l=iprint(s)
3 1000 2000 3000
2
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!