Finding Remainder using Binomial theorem