#include
using namespace std;
int main(){
int num;
cin>>num;
int sumodd=0;
int sumeven=0;
int a,b;
int snum=num/10;
while(num>0){
a=num%10;
sumodd=sumodd+a;
num=num/100;
}
while(snum>0){
b=snum%10;
sumeven=sumeven+a;
snum=snum/100;
}
cout<<sumeven<<endl;
cout<<sumodd<<endl;
return 0;
}
// what is wrong in this code?