def find_fib(num_digits_required):
    """Calculates the first fib number with num_digits_required"""
    last_fib = 0
    current_fib = 1
    index = 1
    current_num_digits = len(str(current_fib))
    while current_num_digits < num_digits_required:
        print('fib=%s index=%s current_num_digits=%s' %
              (current_fib, index, current_num_digits))
        next_fib = last_fib + current_fib
        last_fib = current_fib
        current_fib = next_fib
        index += 1
        current_num_digits = len(str(current_fib))
    print('fib=%s index=%s current_num_digits=%s' %
          (current_fib, index, current_num_digits))
    return current_fib