problem3 in go