#yuki_604 a,b,c=map(int,raw_input().split()) print c/(b+a-1)*a+min(a,c%(b+a-1))