find middle three digits of a given number