def sqrt_expansion(ceil):
    """
    Returns the number of fractions (of the expansion of sqrt(2)) where the
    numerator has more digits than the denominator in the first ceil
    iterations.
    """
    counter = 0
    frac = [1, 1]
    for _ in range(ceil):
        frac = [frac[0] + 2 * frac[1], frac[0] + frac[1]]
        if len(str(frac[0])) > len(str(frac[1])):
            counter += 1
    return counter