def s(N, z, M, o, K): if N == 0 or M == 0: if K == 0: return N*z+M*o else: return -1 if K == 0: return -1 if K > 2*M: return -1 if K >= 2*N: return -1 if K % 2 == 0: return (z+o)*(K//2) + o * (M-K//2) + z * (N-K//2) else: return z * (N-K//2) + (o+z)*(K//2) + o * (M-K//2) def main(): N, M, K = map(int, input().split()) if N >= M: R = s(N, '0', M, '1', K) else: R = s(M, '1', N, '0', K) print(R) if __name__ == '__main__': main()