#include <iostream>
using namespace std;
int main()
{
int num,sum,n=0;
cin>>num;
while (num>0)
{
n++;
int a=0;
a=num%10;
sum+=a;
cout<<a;
num/=10;
}
cout<<endl;
cout<<n<<endl;
cout<<sum<<endl;
}