def right_zeros(n):
z = 0
while True:
n, r = divmod(n, 10)
if n == 0 or r != 0:
return z
z += 1
print(right_zeros(123000))
print(right_zeros(102030))
print(right_zeros(123123))
print(right_zeros(10))
print(right_zeros(0))
print(right_zeros(1))
ZGVmIHJpZ2h0X3plcm9zKG4pOgoJeiA9IDAKCXdoaWxlIFRydWU6CgkJbiwgciA9IGRpdm1vZChuLCAxMCkKCQlpZiBuID09IDAgb3IgciAhPSAwOgoJCQlyZXR1cm4gegoJCXogKz0gMQogCnByaW50KHJpZ2h0X3plcm9zKDEyMzAwMCkpCnByaW50KHJpZ2h0X3plcm9zKDEwMjAzMCkpCnByaW50KHJpZ2h0X3plcm9zKDEyMzEyMykpCnByaW50KHJpZ2h0X3plcm9zKDEwKSkKcHJpbnQocmlnaHRfemVyb3MoMCkpCnByaW50KHJpZ2h0X3plcm9zKDEpKQ==