#include<iostream>
#include<stdlib.h>
using namespace std;
const int maxn = 20;
char a[maxn], b[maxn];
char c[maxn];
int toint(char s[]){
int j = 0;
for(int i=0; i<strlen(s); i++){
if(s[i] == ',')
continue;
c[j++] = s[i];
}
c[j] = ' ';
return atoi(c);
}
int main(){
while(scanf("%s%s", a, b) == 2){
int i = toint(a);
int j = toint(b);
cout<<i + j<<endl;
}
return 0;
}