N = gets.to_i A = (gets || "").split.map(&:to_i) sum = A.sum ans = (0 .. 100).count { |x| (sum + x) % N == 0 } puts ans