#include<bits/stdc++.h> #define MAX 50 using namespace std; int main(){ int x,y,z,i,j=0; while(cin>>x&&x!=0){ j++; int a[x]; z=0; for(i=0;i<x;i++){ cin>>a[i]; z+=a[i]; } int c=0; c=z/x; int d=0; for(i=0;i<x;i++){ if(a[i]>c){ d+=a[i]-c; } } cout<<"Set #"<<j<<endl; cout<<"The minimum number of moves is "<<d<<"."<<endl; } }