#include<bits/stdc++.h>
using namespace std;
int main()
{
string s,b,a,c,d;
cin>>s;
int n,r;
while(cin>>a)
{
r=0;
if(a=="0") break;
if(a.length()>s.length()) swap(s,a);
d+='0';
d+=s;
s.clear();
s=d;
d.clear();
//cout<<s<<"h\n";
for(int i=0;i<s.length();i++)
{
if(s.length()-i>a.length()) b+='0';
else b+=a[a.length()-(s.length()-i)];
}
for(int i=s.length()-1;i>=1;i--)
{
n=s[i]-'0'+b[i]-'0'+r;
if(n>=10) r=1,n-=10;
else r=0;
s[i]=n+'0';
}
s[0]=r+'0';
//cout<<s<<endl;
b.clear();
}
bool f=false;
for(int i=0;i<s.length();i++)
{
if(s[i]!='0') f=true;
if(f) cout<<s[i];
}
cout<<endl;
}