a, b, x = map(int, input().split())
left = 0
right = 10 ** 9 + 1
while right > left + 1:
    mid = (right + left) // 2
    d = len(str(mid))
    price = a * mid + b * d
    if price <= x:
        left = mid
    else:
        right = mid
print(left)

b650f7eb6cfcaded8a0b94b8ae73fc88ed7e5903
<mask token>

<mask token>
while right > left + 1:
    mid = (right + left) // 2
    d = len(str(mid))
    price = a * mid + b * d
    if price <= x:
        left = mid
    else:
        right = mid
print(left)

a, b, x = map(int, input().split())
left = 0
right = 10 ** 9 + 1
while right > left + 1:
    mid = (right + left) // 2
    d = len(str(mid))
    price = a * mid + b * d
    if price <= x:
        left = mid
    else:
        right = mid
print(left)
