import sys l = sys.stdin.readline() abc = map(int, l.split(' ')) t = abc[2] // (abc[0]+abc[1]-1) print(abc[2] - t*(abc[1]-1))