str2int = {"zero":0,"one": 1, "two": 2, "three": 3, "four": 4, "five": 5, "six": 6, "seven": 7, "eight": 8, "nine": 9}

while True:
    try:
        intput_str = input()
        str_list = intput_str.split(" ")
        trans_list = []
        for item in str_list:
            if item in str2int:
                trans_list.append(str2int[item])
            else:
                trans_list.append(item)
        temp_str = ""
        result_list = []
        for item in trans_list:
            if item != "+" and item != "=":
                temp_str = temp_str + str(item)
            else:
                result_list.append(int(temp_str))
                temp_str = ""
        value=result_list[0] + result_list[1]
        if value==0:
            break
        print("{:d}".format(value), end="\n")
    except EOFError:
        break