#include<iostream>
using namespace std;
int main()
{ int n,c,s1=0,s2=0,max=0;
cout<<"n=";
cin>>n;
while(n)
{ c=n%10;
s1=s1+c;
if(c>max)
max=c;
if(c==1)
s2++;
n=n/10;
}
cout<<"Suma cifrelor: "<<s1<<endl;
cout<<"Aparitia cifrei 1: "<<s2<<endl;
cout<<"Cifra maxima: "<<max<<endl;
return 0;
}