# Process input
a, b, x = map(int, input().split())

# Algo
if a > b/3:
    print((x//3)*b+min((x%3)*a, b))
else:
    print(x*a)