problem1 in ocaml