( n + 1 ) to check if all the strings are traversed and no divisible by 5 is obtained like 000000
if dp [ n ] < n + 1 : NEW_LINE INDENT return dp [ n ] NEW_LINE DEDENT else : NEW_LINE INDENT return - 1 NEW_LINE DEDENT