#include <cstdio>

#define MAX 1000000
#define MIN 0
#define SIZE 200

int main() {
 int i,j;
 int a,b;
 int cnt = 0;
 int buf = 0;
 int sets[SIZE];

 while(scanf("%d %d",&a,&b) != EOF) {
  if((a < MIN) || (b < MIN) || (a > MAX) || (b > MAX)) {
   continue;
  }
 
  sets[cnt] = a + b;
  ++cnt;
 }

 for(i = 0;i <= cnt;++i) {
  while(j > MIN) {
   buf += ((sets[i] / j) * j);
   j /= 10;
  }
  
  sets[i] = buf;
  buf = 0;
 }

 for(i = 0;i <= cnt;++i) {
  printf("%d\n",sets[i]);
 }

 return 0;
}