nums = []
while True:
    num =[int(e) for e in input().split()]
    if num[0]==0 and num[1]==0 and num[2]==0:
        break
    nums.append(num)
    
for i in range(len(nums)):
    yakusuu = []
    yakusuu_count = 0
    for j in range(1,nums[i][2]+1):
        if nums[i][2]%j== 0:
            yakusuu.append(j)
    for k in range(len(yakusuu)):
        if nums[i][0]<=yakusuu[k] and yakusuu[k]<=nums[i][1]:
            yakusuu_count += 1
    print(yakusuu_count)
