def binary_to_decimal(number):
    """
        Calculates the decimal of the given binary number.

        :param number: decimal number in string or integer format
        :return integer of the equivalent decimal number
    """
    decimal = []
    number = list(str(number)[::-1])
    for i in range(len(number)):
        decimal.append(int(number[i]) * (2 ** i))

    return sum(decimal)