def ConvertToDecimal(num, old_base):
    """Convert a old_base Number to a Decimal Number."""
    result = 0
    counter = 0
    while num > 0:
        result += (num%10) * old_base**counter
        counter += 1
        num = int(num/10)

    return result