1)
#include <iostream>
using namespace std;
int n,S;
int main()
{
cin>>n;
for(i=2;i<=n/2;i++)
{
if(n%i==0)S=S+i;
}
cout<<S;
return 0;
}
2)
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
int m,n,x,nrd;
ifstream f("sir.txt");
f>>m>>n;
for(int i=0;i<n;i++)
{f>>x; if(x%m==0)nrd++; }
cout<<nrd;
f.close();
return 0;
}