text: /******************************************************************************
   -  domain:     Sphere online judge
   -  contest:    list of classical problems
   -  problem:    CANDY - Candy I
   -  link:       https://www.spoj.com/problems/CANDY/
   -  hash:       $$$$$$$$$$name
  
   -  author:     Vitor SRG
   -  version:    $$$$$$$$$$date
  
   -  tags:       sort count avg
  
   -  language:   C++14
   ******************************************************************************/
  
  
  /* Please contact for the solution */
   
  
  /******************************************************************************
   -  test:
      input:      |
                  5
                  1
                  1
                  1
                  1
                  6
                  2
                  3
                  4
                  -1
      output:     |
                  4
                  -1
   ******************************************************************************/
  