In dividing a number by 585, a student employed the method of short division. He divided the number successively by 5,9 and 13 (factors 585) and got the remainders 4,8,12 respectively. If he had divided the number by 585, the remainder would have been.