def n_digits(figure):
    """Return the number of decimals of the given figure."""
    n = 0
    for ch in figure:
        if ch == "e":
            return n
        elif ch in "0123456789":
            n += 1
    return n