#include<iostream>
#include<sstream>
#include<string>
using namespace std;
int main(){
int n; char colon; float f,ans=0.0;
string line;
while(getline(cin,line)){
istringstream s(line);
while(s>>n>>colon>>f)
if(n%2==0) ans=ans-f;
else ans=ans+f;
cout<<ans<<endl;
ans=0.0;
}
}