#include <bits/stdc++.h>
using namespace std;
int main(){
int a;
cin>>a;
int a1,a2,a3,a4,a5,a6,a7,a8,a9;
a1=a/100000000;
a2=a%100000000/10000000;
a3=a%10000000/1000000;
a4=a%1000000/100000;
a5=a%100000/10000;
a6=a%10000/1000;
a7=a%1000/100;
a8=a%100/10;
a9=a%10;
int a10,a20,a30;
a10=a1100+a210+a3;
a20=a4100+a510+a6;
a30=a7100+a810+a9;
cout <<a10a20a30;
}