Solution for 1004 is accepted.