h,w,k = map(int, input().split()) assert 2<=h<=2*10**5 assert 2 <= w <= 2*10**5 assert 0<=k<=h+w-2