# frozen_string_literal: true def solve return 101 unless A s = A.sum (0..100).map { (s + _1) % N } .count { _1.zero? } end N = gets.to_i A = gets&.split&.map { _1.to_i } puts solve