a,b,s = map(int,input().split()) n = s d = [[1] for _ in range(n+1)] ans = a*b for i in range(2,n+1): d[i].append(i) v = d[i] for j in range(len(v)//2): x,y = v[j],v[-j-1] ans += max(0,a-x+1)*max(0,b-y+1) x,y = y,x ans += max(0,a-x+1)*max(0,b-y+1) if len(v)%2==1: x = v[len(v)//2] ans += max(0,a-x+1)*max(0,b-x+1) for j in range(i*2,n+1,i): d[j].append(i) print(ans)