#include<iostream>
#include<string>
#include<vector>
#include<stdlib.h>
#include<stdio.h>
using namespace std;
class StrAnalyse
{
public:
StrAnalyse();
void Deal();
private:
void SplitStr();
bool isValid();
void Transfer();
void Sum();
string strInput;
vector<string> m_vStrNum;
vector<int> m_vIntNum;
string m_strSum;//string
};
StrAnalyse::StrAnalyse()
{
getline(cin,strInput);
}
void StrAnalyse::SplitStr()
{
string::size_type beg = 0;
string::size_type end = strInput.find(‘ ‘,beg);
while(end != string::npos)
{
m_vStrNum.push_back(strInput.substr(beg,end-beg));
beg = end+1;
if(beg>=strInput.size())
{
break;
}
end = strInput.find(‘ ‘,beg);
}
if(beg<strInput.size())
{
m_vStrNum.push_back(strInput.substr(beg));
}
}
void StrAnalyse::Transfer()
{
for(int i=0;i<m_vStrNum.size();i++)
{
string temp(m_vStrNum[i].substr(0,m_vStrNum[i].find(‘.‘)));
m_vIntNum.push_back(atoi(temp.c_str()));
}
}
void StrAnalyse::Sum()
{
int sum=0;
for(int i=0;i<m_vIntNum.size();i++)
{
sum+=m_vIntNum[i];
}
char buf[16]="";
sprintf(buf,"%d",sum);
m_strSum = buf;
}
void StrAnalyse::Deal()
{
SplitStr();
Transfer();
Sum();
cout<<m_strSum<<endl;
}
int main()
{
StrAnalyse om;
om.Deal();
return 0;
}