from sys import * n = input() s = sum(map(int, raw_input().strip().split())) print max(s + 1 >> 1, n)