def octal_To_Decimal(n):
    decimal = 0
    base = 1
    temp = n
    while temp > 0:
        last_digit = temp % 10
        temp = temp // 10
        decimal += last_digit * base
        base *= 8
    return decimal