Question: In how many ways can the number $122345$ be arranged such that no digit occupies its original place?
I know the formula for derangements, but that is applicable only when all variables are distinct. I am not able to proceed due to the identical digits.