How to write complexity of a program? Please help me to write big Oh notation : What is the number of steps it will take to run Program 2 in the worst case? Express your answer in terms of n, the size of the input x.    
    
    def program2(x):
        total = 0
        for i in range(1000):
            total = i

        while x > 0:
            x = x//2
            total += x

        return total