#include<bits/stdc++.h>
using namespace std;
const int N = 10;
int n[N];
bool b = false;
int sti(string s) {
if (s == "one")
return 1;
else if (s == "two")
return 2;
else if (s == "three")
return 3;
else if (s == "four")
return 4;
else if (s == "five")
return 5;
else if (s == "six")
return 6;
else if (s == "seven")
return 7;
else if (s == "eight")
return 8;
else if (s == "nine")
return 9;
else if (s == "zero")
b = true;
return 0;
return 0;
}
int main() {
string s;
int index = 1;
while (cin >> s) {
if (s == "=")
break;
n[index] = sti(s);
index++;
}
if (n[4] == 0&&b==false) {
printf("%d", n[1] + n[3]);
}
else if (n[5] == 0&&b==false) {
if (n[2] == '+') {
printf("%d", n[1] + n[3] * 10 + n[4]);
}
else {
printf("%d", n[1] * 10 + n[2] + n[4]);
}
}
else {
printf("%d", n[1] * 10 + n[2] + n[4] * 10 + n[5]);
}
}