#!/usr/bin/ruby l=gets.to_i gets a=gets.split.map(&:to_i).sort s=i=0 while i