INPUT L
INPUT R
k = 0
FOR x = L TO R
    p = 1
    c = x
    WHILE c > 0
        p = p * (c MOD 10)
        c = c \ 10
    WEND
    IF p <> 0 THEN
        IF x MOD p = 0 THEN k = k + 1
    END IF
NEXT x
PRINT k