let () = Scanf.scanf "%d %d" @@ fun n l ->
  let apples = Array.init n @@ ( + ) l in
  Printf.printf "%d\n" @@
  Array.fold_left ( + ) 0 apples
  - Array.fold_left (fun acc a -> min acc (abs a)) max_int apples