import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] a = new int[n - 1]; for (int i = 0; i < n - 1; i++) { a[i] = sc.nextInt(); } sc.close(); int sum = 0; for (int i = 0; i < a.length; i++) { sum += a[i]; } int ans = 0; for (int i = 0; i <= 100; i++) { if ((sum + i) % n == 0) { ans++; } } System.out.println(ans); } }