// // Yukicoder // No.1406 //#include "stdafx.h" #include #include #include #include //list #include //tree #include //連想配列 #include //hash #include //hash #include #include #include #include using namespace std; typedef unsigned long long ULL; typedef signed long long SLL; typedef unsigned int UINT; #define START (0) #define RIGHT (1) #define UP (2) #define LEFT (3) #define DOWN (4) #define DATA_MAX (1000000) #define FMAX(a,b) ((a)>(b)?(a):(b)) #define FMIN(a,b) ((a)<(b)?(a):(b)) //vectorは便利だが処理時間がかかるので注意 vector > memo2;//二次元可変配列 vector memo1; SLL H ,A, B, T, F, N, M, Result; SLL a[15]; SLL dp[5005][5005]; struct BOX { SLL w; SLL v; }; BOX box[5005]; //美しさの降順にソート int compare(const BOX * a, const BOX *b) { if (a->v < b->v) return (1); else if (a->v > b->v) return (-1); return (0); } int main(int argc, char *argv[]) { SLL sum = 0,ans=0; // 入力部 cin >> N; for (int i = 0; i < N-1; i++) { cin >> a[i]; sum += a[i]; } for (int i = 0; i <= 100; i++) { if (((sum + i) % N) == 0) ans++; } //Sorting //qsort(&box[0], N, sizeof(BOX), (int(*)(const void*,const void*))compare); cout << ans << endl; /////////////////// //cout << endl; //getchar(); return 0; //end }