#include <iostream>
#include <cstring>
#include <iomanip>
#include <cmath>
#include <cstdlib>

using namespace std;

char t[1010];
struct object{ char name[1000]; char price[20]; };
struct object l[1010];
int n,sf;
double s;
int fake;

int main()
{
    cin.getline(t,1010);
    int i=0,i1=0,i2=0,i3=0;
    int d=1;

    while(i3<strlen(t))
    {
        i1=i3;
        i2=i1;

        while(!isdigit(t[i2]))
            i2++;

        i3=i2;

        while(isdigit(t[i3])||t[i3]=='.')
            i3++;

    strncpy(l[d].name,t+i1,i2-i1);
    strncpy(l[d].price,t+i2,i3-i2);
    d++;
    }

    for(int i=1;i<=d;i++)
{
    if(i==100)
    {
        fake=fake;
    }
    char x[10][3];
    int nr=1;

    char *p;
    p=strtok(l[i].price,".");

    while(p)
    {
        strcpy(x[nr++],p);
        p=strtok(NULL,".");
    }
    nr--;

    if(strlen(x[nr])==2){
        s+=atof(x[nr])*1.00/100;
        nr--;
    }

    for(int j=nr;j>=1;j--)
    {
        char t[4];
        strncpy(t,x[j],3);
        int r=atoi(t)*pow(10,3*(nr-j));
        s+=r;
   //     cout<<(int)s<<endl;
    }
}

    int c[20],pf,len=1,trio=0;
    pf=ceil((s-floor(s))*100);
    s=floor(s);

    while((int)s!=0)
    {
    c[len++]=(int)s%10;
    trio++;
    if(trio==3){
        c[len++]=-1;
        trio=0;
    }
    s/=10;
    }
    len--;

    for(int i=len;i>=1;i--)
        if(c[i]==-1)
            cout<<".";
    else cout<<c[i];

    if(len==0)
        cout<<0;

    if(pf!=0){
    cout<<".";
    {
        if(pf<10)
            cout<<0;
        cout<<pf;
    }
    }

    return 0;
}


/*
PE LANGA PLOPII FARA SOT...

Pe lânga plopii fara sot
Adesea am trecut;
Ma cunosteau vecinii totii �
Tu nu m-ai cunoscut.

La geamul tau ce stralucea
Privii atât de des;
O lume toata-ntelegea �
Tu nu m-ai înteles.

De câte ori am asteptat
O soapta de raspuns!
O zi din viata sa-mi fi dat,
O zi mi-era de-ajuns;

O ora sa fi fost amici,
Sa ne iubim cu dor,
S-ascult de glasul gurii mici,
O ora, si sa mor.

Dându-mi din ochiul tau senin
O raza dinadins,
In calea timpilor ce vin
O stea s-ar fi aprins;

Ai fi trait în veci de veci
Si rânduri de vieti,
Cu ale tale brate reci
Inmarmureai maret,

Un chip de-a pururi adorat
Cum nu mai au perechi
Acele zâne ce strabat
Din timpurile vechi.

Caci te iubeam cu ochi pagâni
Si plini de suferinti,
Ce mi-i lasara din batrâni
Parintii din parinti.

Azi nici macar îmi pare rau
Ca trec cu mult mai rar,
Ca cu tristeta capul tau
Se-ntoarce în zadar,

Caci azi le semeni tuturor
La umblet si la port,
Si te privesc nepasator
C-un rece ochi de mort.

Tu trebuia sa te cuprinzi
De acel farmec stânt,
Si noaptea candela s-aprinzi
Iubirii pe pamânt.

(1883, 28 august / 9 septembrie)
*/

#include <iostream>
#include <cstring>
#include <iomanip>
#include <cmath>
#include <cstdlib>

using namespace std;

char t[1010];
struct object{ char name[1000]; char price[20]; };
struct object l[1010];
int n,sf;
float s;
int fake,fracts,fract;

int main()
{
    cin.getline(t,1010);
    int i=0,i1=0,i2=0,i3=0;
    int d=1;
    int fracts=0,fract=0;

    while(i3<strlen(t))
    {
        i1=i3;
        i2=i1;

        while(!isdigit(t[i2]))
            i2++;

        i3=i2;

        while(isdigit(t[i3])||t[i3]=='.')
            i3++;

    strncpy(l[d].name,t+i1,i2-i1);
    strncpy(l[d].price,t+i2,i3-i2);
    d++;
    }

    for(int i=1;i<=d;i++)
{
    /*
    if(i==100)
    {
        fake=fake;
    }
    */

    char x[10][3];
    int nr=1;

    char *p;
    p=strtok(l[i].price,".");

    while(p)
    {
        strcpy(x[nr++],p);
        p=strtok(NULL,".");
    }
    nr--;

    if(strlen(x[nr])==2){
        fracts+=atoi(x[nr]);
        nr--;
    }

    for(int j=nr;j>=1;j--)
    {
        char t[4];
        strncpy(t,x[j],3);
        int r=atoi(t)*pow(10,3*(nr-j));
        s+=float(r);
   //     cout<<(int)s<<endl;
    }
}

    int c[20],pf,len=1,trio=0;
 //   pf=ceil((s-floor(s))*100);
    s=(int)s+fracts/100;
    fract=fracts%100;

    while((int)s!=0)
    {
    c[len++]=(int)s%10;
    trio++;
    if(trio==3 && s>9){
        c[len++]=-1;
        trio=0;
    }
    s/=10;
    }
    len--;

    for(int i=len;i>=1;i--)
        if(c[i]==-1)
            cout<<".";
    else cout<<c[i];

    if(len==0)
        cout<<0;

    if(fract!=0){
    cout<<".";
    {
        if(fract<10)
            cout<<0;
        cout<<fract;
    }
    }

    return 0;
}


/*
ID: y1197771
PROG: test
LANG: C++
*/
#include<bits/stdc++.h>
#define pb push_back
#define FOR(i, n) for (int i = 0; i < (int)n; ++i)
#define dbg(x) cout << #x << " at line " << __LINE__ << " is: " << x << endl
typedef long long ll;
using namespace std;
typedef pair<int, int> pii;
const int maxn = 1e3 + 10;
void solve() {
    string s;
    while(cin >> s) {
        int n = s.size();
        int i = 0;
        ll res = 0;
        while(i < n) {
            while(!isdigit(s[i])) i++;
            //cout << i << endl;
            ll now = 0;
            bool f = 0;
            bool flag = 0;
            while(i < n && isdigit(s[i])) {
                int cnt = 0;
                int d = 0;
                while(i < n && isdigit(s[i])) {
                    d = d * 10 + s[i] - '0';
                    cnt++; i++;
                }
                if(f && cnt == 2) {
                    //now = now + (s[i - 1] - '0') / 100.0 + (s[i - 2] - '0') / 10.0;
                    now = now * 100 + d;
                    flag = 1;
                } else {
                    now = now * 1000 + d;
                }
                if(i < n && s[i] == '.') {
                    f = 1; i++;
                }
            }
            //cout << now << endl;
            if(!flag) now = now * 100;
            res += now;
        }
        //printf("%f\n", res);
        int left = res % 100;
        string s2 = "";
        if(left) {
            stringstream ss;
            ss << "." << left;
            s2 = ss.str();
            if(s2.size() < 3) s2.insert(1, 1, '0');
        }
        left = res / 100;
        stringstream ss; ss << left;
        string s1 = ss.str();
        reverse(s1.begin(), s1.end());
        for (int i = 0; i < s1.size(); i++) {
            if(i + 3 < s1.size()) {
                s1.insert(i + 3, 1, '.');
                i += 3;
            } else break;
        }
        reverse(s1.begin(), s1.end());
        s1 += s2;
        cout << s1 << endl;
    }
}
int main() {
    //freopen("test.in", "r", stdin);
    //freopen("test.out", "w", stdout);
    solve();
    return 0;
}


/*
ID: y1197771
PROG: test
LANG: C++
*/
#include<bits/stdc++.h>
#define pb push_back
#define FOR(i, n) for (int i = 0; i < (int)n; ++i)
#define dbg(x) cout << #x << " at line " << __LINE__ << " is: " << x << endl
typedef long long ll;
using namespace std;
typedef pair<int, int> pii;
const int maxn = 1e3 + 10;
double a[maxn];
int cnt;
void solve() {
    string s;
    while(cin >> s) {
        bool test = 0;
        bool test2 = 0;
        if(s.find("a1.000.000a1.000.000a1.000.000a1.000.000a1.000.000a1") == 0) {
            test = 1;
        }
        int n = s.size();
        int i = 0;
        double res = 0;
        while(i < n) {
            while(!isdigit(s[i])) i++;
            //cout << i << endl;
            double now = 0;
            bool f = 0;
            while(i < n && isdigit(s[i])) {
                int cnt = 0;
                int d = 0;
                while(i < n && isdigit(s[i])) {
                    d = d * 10 + s[i] - '0';
                    cnt++; i++;
                }
                if(f && cnt == 2) {
                    now = now + (s[i - 1] - '0') / 100.0 + (s[i - 2] - '0') / 10.0;
                    test2 = 1;
                } else {
                    now = now * 1000 + d;
                }
                if(i < n && s[i] == '.') {
                    f = 1; i++;
                }
            }
            if(f && test && test2) {
                cout << now << endl;
            }
            //printf("%f\n", now);
            //a[cnt++] = now;
            res += now;
        }
        //printf("%f\n", res);

        double tmp = (res - floor(res)) * 100;
        //printf("%f %f\n", (res - floor(res)) * 100, tmp);
        int left = (int)ceil(tmp) % 100;
        //printf("%f %d\n", res, left);
        string s2 = "";
        if(left) {
            stringstream ss;
            ss << "." << left;
            s2 = ss.str();
            if(s2.size() < 3) s2.insert(1, 1, '0');
        }
        left = floor(res);
        stringstream ss; ss << left;
        string s1 = ss.str();
        reverse(s1.begin(), s1.end());
        for (int i = 0; i < s1.size(); i++) {
            if(i + 3 < s1.size()) {
                s1.insert(i + 3, 1, '.');
                i += 3;
            } else break;
        }
        reverse(s1.begin(), s1.end());
        s1 += s2;
        cout << s1 << endl;
    }
}
int main() {
    //freopen("test.in", "r", stdin);
    //freopen("test.out", "w", stdout);
    solve();
    return 0;
}


/*
ID: y1197771
PROG: test
LANG: C++
*/
#include<bits/stdc++.h>
#define pb push_back
#define FOR(i, n) for (int i = 0; i < (int)n; ++i)
#define dbg(x) cout << #x << " at line " << __LINE__ << " is: " << x << endl
typedef long long ll;
using namespace std;
typedef pair<int, int> pii;
const int maxn = 1e3 + 10;
double a[maxn];
int cnt;
void solve() {
    string s;
    while(cin >> s) {
        bool test = 0;
        bool test2 = 0;
        if(s.find("a1.000.000a1.000.000a1.000.000a1.000.000a1.000.000a1") == 0) {
            test = 1;
        }
        int n = s.size();
        int i = 0;
        double res = 0;
        while(i < n) {
            while(!isdigit(s[i])) i++;
            //cout << i << endl;
            double now = 0;
            bool f = 0;
            while(i < n && isdigit(s[i])) {
                int cnt = 0;
                int d = 0;
                while(i < n && isdigit(s[i])) {
                    d = d * 10 + s[i] - '0';
                    cnt++; i++;
                }
                if(f && cnt == 2) {
                    now = now + (s[i - 1] - '0') / 100.0 + (s[i - 2] - '0') / 10.0;
                    test2 = 1;
                } else {
                    now = now * 1000 + d;
                }
                if(i < n && s[i] == '.') {
                    f = 1; i++;
                }
            }
            if(f && test && test2) {
                cout << now << endl;
            }
            //cout << now << endl;
            a[cnt++] = now;
            res += now;
        }
        //printf("%f\n", res);
        int left = ((ll)floor(res * 100)) % 100;
        string s2 = "";
        if(left) {
            stringstream ss;
            ss << "." << left;
            s2 = ss.str();
            if(s2.size() < 3) s2.insert(1, 1, '0');
        }
        left = floor(res);
        stringstream ss; ss << left;
        string s1 = ss.str();
        reverse(s1.begin(), s1.end());
        for (int i = 0; i < s1.size(); i++) {
            if(i + 3 < s1.size()) {
                s1.insert(i + 3, 1, '.');
                i += 3;
            } else break;
        }
        reverse(s1.begin(), s1.end());
        s1 += s2;
        cout << s1 << endl;
    }
}
int main() {
    //freopen("test.in", "r", stdin);
    //freopen("test.out", "w", stdout);
    solve();
    return 0;
}


/*
ID: y1197771
PROG: test
LANG: C++
*/
#include<bits/stdc++.h>
#define pb push_back
#define FOR(i, n) for (int i = 0; i < (int)n; ++i)
#define dbg(x) cout << #x << " at line " << __LINE__ << " is: " << x << endl
typedef long long ll;
using namespace std;
typedef pair<int, int> pii;
const int maxn = 1e3 + 10;
double a[maxn];
int cnt;
void solve() {
    string s;
    while(cin >> s) {
        bool test = 0;
        bool test2 = 0;
        if(s.find("a1.000.000a1.000.000a1.000.000a1.000.000a1.000.000a1") == 0) {
            test = 1;
        }
        int n = s.size();
        int i = 0;
        double res = 0;
        while(i < n) {
            while(!isdigit(s[i])) i++;
            //cout << i << endl;
            double now = 0;
            bool f = 0;
            while(i < n && isdigit(s[i])) {
                int cnt = 0;
                int d = 0;
                while(i < n && isdigit(s[i])) {
                    d = d * 10 + s[i] - '0';
                    cnt++; i++;
                }
                if(f && cnt == 2) {
                    now = now + (s[i - 1] - '0') / 100.0 + (s[i - 2] - '0') / 10.0;
                    test2 = 1;
                } else {
                    now = now * 1000 + d;
                }
                if(i < n && s[i] == '.') {
                    f = 1; i++;
                }
            }
            if(f && test && test2) {
                cout << now << endl;
            }
            //cout << now << endl;
            a[cnt++] = now;
            res += now;
        }
        //printf("%f\n", res);
        int left = ((int)floor(res * 100)) % 100;
        string s2 = "";
        if(left) {
            stringstream ss;
            ss << "." << left;
            s2 = ss.str();
            if(s2.size() < 3) s2.insert(1, 1, '0');
        }
        left = floor(res);
        stringstream ss; ss << left;
        string s1 = ss.str();
        reverse(s1.begin(), s1.end());
        for (int i = 0; i < s1.size(); i++) {
            if(i + 3 < s1.size()) {
                s1.insert(i + 3, 1, '.');
                i += 3;
            } else break;
        }
        reverse(s1.begin(), s1.end());
        s1 += s2;
        cout << s1 << endl;
    }
}
int main() {
    //freopen("test.in", "r", stdin);
    //freopen("test.out", "w", stdout);
    solve();
    return 0;
}


/*
ID: y1197771
PROG: test
LANG: C++
*/
#include<bits/stdc++.h>
#define pb push_back
#define FOR(i, n) for (int i = 0; i < (int)n; ++i)
#define dbg(x) cout << #x << " at line " << __LINE__ << " is: " << x << endl
typedef long long ll;
using namespace std;
typedef pair<int, int> pii;
const int maxn = 1e3 + 10;
double a[maxn];
int cnt;
void solve() {
    string s;
    while(cin >> s) {
        bool test = 0;
        if(s.find("a1.000.000a1.000.000a1.000.000a1.000.000a1.000.000a1") == 0) {
            test = 1;
        }
        int n = s.size();
        int i = 0;
        double res = 0;
        while(i < n) {
            while(!isdigit(s[i])) i++;
            //cout << i << endl;
            double now = 0;
            bool f = 0;
            while(i < n && isdigit(s[i])) {
                int cnt = 0;
                int d = 0;
                while(i < n && isdigit(s[i])) {
                    d = d * 10 + s[i] - '0';
                    cnt++; i++;
                }
                if(f && cnt == 2) {
                    now = now + (s[i - 1] - '0') / 100.0 + (s[i - 2] - '0') / 10.0;
                } else {
                    now = now * 1000 + d;
                }
                if(i < n && s[i] == '.') {
                    f = 1; i++;
                }
            }
            if(f && test) {
                cout << now << endl;
            }
            //cout << now << endl;
            a[cnt++] = now;
            res += now;
        }
        //printf("%f\n", res);
        int left = ((int)floor(res * 100)) % 100;
        string s2 = "";
        if(left) {
            stringstream ss;
            ss << "." << left;
            s2 = ss.str();
            if(s2.size() < 3) s2.insert(1, 1, '0');
        }
        left = floor(res);
        stringstream ss; ss << left;
        string s1 = ss.str();
        reverse(s1.begin(), s1.end());
        for (int i = 0; i < s1.size(); i++) {
            if(i + 3 < s1.size()) {
                s1.insert(i + 3, 1, '.');
                i += 3;
            } else break;
        }
        reverse(s1.begin(), s1.end());
        s1 += s2;
        cout << s1 << endl;
    }
}
int main() {
    //freopen("test.in", "r", stdin);
    //freopen("test.out", "w", stdout);
    solve();
    return 0;
}


/*
ID: y1197771
PROG: test
LANG: C++
*/
#include<bits/stdc++.h>
#define pb push_back
#define FOR(i, n) for (int i = 0; i < (int)n; ++i)
#define dbg(x) cout << #x << " at line " << __LINE__ << " is: " << x << endl
typedef long long ll;
using namespace std;
typedef pair<int, int> pii;
const int maxn = 1e3 + 10;
double a[maxn];
int cnt;
void solve() {
    string s;
    while(cin >> s) {
        int n = s.size();
        int i = 0;
        double res = 0;
        while(i < n) {
            while(!isdigit(s[i])) i++;
            //cout << i << endl;
            double now = 0;
            bool f = 0;
            while(i < n && isdigit(s[i])) {
                int cnt = 0;
                int d = 0;
                while(i < n && isdigit(s[i])) {
                    d = d * 10 + s[i] - '0';
                    cnt++; i++;
                }
                if(f && cnt == 2) {
                    now = now + (s[i - 1] - '0') / 100.0 + (s[i - 2] - '0') / 10.0;
                } else {
                    now = now * 1000 + d;
                }
                if(i < n && s[i] == '.') {
                    f = 1; i++;
                }
            }
            //cout << now << endl;
            a[cnt++] = now;
            res += now;
        }
        //printf("%f\n", res);
        int left = ((int)floor(res * 100)) % 100;
        string s2 = "";
        if(left) {
            stringstream ss;
            ss << "." << left;
            s2 = ss.str();
            if(s2.size() < 3) s2.insert(1, 1, '0');
        }
        left = floor(res);
        stringstream ss; ss << left;
        string s1 = ss.str();
        reverse(s1.begin(), s1.end());
        for (int i = 0; i < s1.size(); i++) {
            if(i + 3 < s1.size()) {
                s1.insert(i + 3, 1, '.');
                i += 3;
            } else break;
        }
        reverse(s1.begin(), s1.end());
        s1 += s2;
        cout << s1 << endl;
    }
}
int main() {
    //freopen("test.in", "r", stdin);
    //freopen("test.out", "w", stdout);
    solve();
    return 0;
}


#include <iostream>
using namespace std;

int main()
{
    string str;
    cin >> str;
    double tot=0;
    double p;
    for(int i=0;i<str.size();)
    {
        if(str[i]>='a'&&str[i]<='z') {i++;continue;}
        string num;
        p=0;
        int dot=0;
        while(i<str.size()&&((str[i]>='0'&&str[i]<='9')||str[i]=='.'))
        {
            if(str[i]!='.')
            {
                if(dot) dot++;
            p=p*10+(str[i]-'0');
            }
            else
            {
                dot=1;
            }
            num+=str[i++];
        }
        if(dot==3) p/=100;
        tot+=p;
//        cout << p << endl;
    }
    long long t=tot,tt=(tot*100-t*100+0.5);
//    cout << t << " " << tt << endl;
    long long out[10000],o=0;
    while(t)
    {
        if(t>=1000) {
                out[o++]=t%1000;
                t/=1000;
        }
        else {
                out[o++]=t;
        t=0;}
    }
//    cout << o << endl;
    if(o)
    {
        cout <<out[o-1];
        for(int i=o-2;~i;--i)
            printf(".%03d",out[i]);
        if(tt)
            cout << "." << tt << endl;
    }
    else
    {
        if(tt>=10)
        cout << "0." << tt << endl;
        else cout << "0.0" << tt << endl;
    }
    return 0;
}


#include <iostream>
using namespace std;

int main()
{
    string str;
    cin >> str;
    double tot=0;
    double p;
    for(int i=0;i<str.size();)
    {
        if(str[i]>='a'&&str[i]<='z') {i++;continue;}
        string num;
        p=0;
        int dot=0;
        while(i<str.size()&&((str[i]>='0'&&str[i]<='9')||str[i]=='.'))
        {
            if(str[i]!='.')
            {
                if(dot) dot++;
            p=p*10+(str[i]-'0');
            }
            else
            {
                dot=1;
            }
            num+=str[i++];
        }
        if(dot==3) p/=100;
        tot+=p;
//        cout << p << endl;
    }
    cout << tot << endl;
    int t=tot,tt=(tot*100-t*100+0.5);
//    cout << t << " " << tt << endl;
    int out[10000],o=0;
    while(t)
    {
        if(t>=1000) {
                out[o++]=t%1000;
                t/=1000;
        }
        else {
                out[o++]=t;
        t=0;}
    }
//    cout << o << endl;
    if(o)
    {
        cout <<out[o-1];
        for(int i=o-2;~i;--i)
            cout << "." << out[i];
        if(tt)
            cout << "." << tt << endl;
    }
    else
    {
        if(tt>=10)
        cout << "0." << tt << endl;
        else cout << "0.0" << tt << endl;
    }
    return 0;
}


#include <iostream>
using namespace std;

int main()
{
    string str;
    cin >> str;
    double tot=0;
    double p;
    for(int i=0;i<str.size();)
    {
        if(str[i]>='a'&&str[i]<='z') {i++;continue;}
        string num;
        p=0;
        int dot=0;
        while(i<str.size()&&((str[i]>='0'&&str[i]<='9')||str[i]=='.'))
        {
            if(str[i]!='.')
            {
                if(dot) dot++;
            p=p*10+(str[i]-'0');
            }
            else
            {
                dot=1;
            }
            num+=str[i++];
        }
        if(dot==3) p/=100;
        tot+=p;
//        cout << p << endl;
    }
    long long t=tot,tt=(tot*100-t*100+0.5);
//    cout << t << " " << tt << endl;
    long long out[10000],o=0;
    while(t)
    {
        if(t>=1000) {
                out[o++]=t%1000;
                t/=1000;
        }
        else {
                out[o++]=t;
        t=0;}
    }
//    cout << o << endl;
    if(o)
    {
        cout <<out[o-1];
        for(int i=o-2;~i;--i)
            cout << "." << out[i];
        if(tt)
            cout << "." << tt << endl;
    }
    else
    {
        if(tt>=10)
        cout << "0." << tt << endl;
        else cout << "0.0" << tt << endl;
    }
    return 0;
}


#include <iostream>
using namespace std;

int main()
{
    string str;
    cin >> str;
    double tot=0;
    double p;
    for(int i=0;i<str.size();)
    {
        if(str[i]>='a'&&str[i]<='z') {i++;continue;}
        string num;
        p=0;
        int dot=0;
        while(i<str.size()&&((str[i]>='0'&&str[i]<='9')||str[i]=='.'))
        {
            if(str[i]!='.')
            {
                if(dot) dot++;
            p=p*10+(str[i]-'0');
            }
            else
            {
                dot=1;
            }
            num+=str[i++];
        }
        if(dot==3) p/=100;
        tot+=p;
//        cout << p << endl;
    }
    long long t=tot,tt=(tot*100-t*100+0.5);
//    cout << t << " " << tt << endl;
    long long out[10000],o=0;
    while(t)
    {
        if(t>=1000) {
                out[o++]=t%1000;
                t/=1000;
        }
        else {
                out[o++]=t;
        t=0;}
    }
//    cout << o << endl;
    if(o)
    {
        cout <<out[o-1];
        for(int i=o-2;~i;--i)
            printf(".%03d",out[i]);
        if(tt)
            printf(".%02d",tt);
    }
    else
    {
        if(tt>=10)
        cout << "0." << tt << endl;
        else cout << "0.0" << tt << endl;
    }
    return 0;
}


#include <iostream>
using namespace std;

int main()
{
    string str;
    cin >> str;
    double tot=0;
    double p;
    for(int i=0;i<str.size();)
    {
        if(str[i]>='a'&&str[i]<='z') {i++;continue;}
        string num;
        p=0;
        int dot=0;
        while(i<str.size()&&((str[i]>='0'&&str[i]<='9')||str[i]=='.'))
        {
            if(str[i]!='.')
            {
                if(dot) dot++;
            p=p*10+(str[i]-'0');
            }
            else
            {
                dot=1;
            }
            num+=str[i++];
        }
        if(dot==3) p/=100;
        tot+=p;
//        cout << p << endl;
    }
    int t=tot,tt=(tot*100-t*100+0.5);
//    cout << t << " " << tt << endl;
    int out[10000],o=0;
    while(t)
    {
        if(t>=1000) {
                out[o++]=t%1000;
                t/=1000;
        }
        else {
                out[o++]=t;
        t=0;}
    }
//    cout << o << endl;
    if(o)
    {
        cout <<out[o-1];
        for(int i=o-2;~i;--i)
            cout << "." << out[i];
        if(tt)
            cout << "." << tt << endl;
    }
    else
    {
        if(tt>=10)
        cout << "0." << tt << endl;
        else cout << "0.0" << tt << endl;
    }
    return 0;
}


/* ***********************************************
Author        :yuanzhaolin
Created Time  :2016年10月17日 星期一 20时48分39秒
File Name     :b.cpp
************************************************ */

#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <sstream>
#include <map>
#include <string>
#include <cmath>
#include <stdlib.h>
#include <time.h>
#include <queue>
#include <utility>
using namespace std;
#define repp(i,a,b) for(int i=a;i<=b;i++)
#define rep(i,a) for(int i=0;i<a;i++)
#define REP(i,a) for(int i=1;i<=a;i++)
#define per(i,a,b) for(int i=a-1;i>=b;i--)
#define foreach(i,a) for(int i=head[a];i>=0;i=ee[i].next)
#define Foreach(i,a) for(__typeof((a).begin())i=(a).begin();i!=(a).end();i++)
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define mp make_pair
#define m0(x) memset(x,0,sizeof(x))
#define mff(x) memset(x,0xff,sizeof(x))
#define fi first
#define se second
#define lson k<<1,l,(l+r)/2
#define rson k<<1|1,(l+r)/2+1,r
#define chl (k<<1)
#define chr (k<<1|1)
#define SZ(x) ((int)(x).size())
#define showtime fprintf(stderr,"time = %.15f\n",clock() / (double)CLOCKS_PER_SEC)
#define sqr(x) ((x)*(x))
#define C1(x) cout<<x<<endl
#define C2(x,y) cout<<x<<" "<<y<<endl
#define C3(x,y,z) cout<<x<<" "<<y<<" "<<z<<endl
typedef long long ll;
typedef vector<int> VI;
typedef pair<int,int> PII;
typedef vector< pair<int,int> > VPII;
const ll mod=1e9+7;
const ll maxn=1e5+7;
const ll maxe=1e6+7;
const ll INF=1e9+7;
const double PI=acos(-1);
int dx[4]={0,0,1,-1};
int dy[4]={-1,1,0,0};
inline void Max(int &a,int b){
   if(b>a)a=b;
}
inline void Min(int &a,int b){
  if(a==-1||b<a)a=b;
}
int n;
string S;
int main()
{
    //freopen("in.txt","r",stdin);
    //freopen("out.txt","w",stdout);
   	cin>>S;
   	S=S+'c';
   	double ans=0;
   	double cur=0;
   	int pre=-INF;
   	for(int i=0;i<S.length();i++)
	{
		if(S[i]=='.')
		{
			pre=i;
			continue;
		}
		int c=S[i]-'0';
		if(c<0||c>9)
		{
			if(cur!=0)
			{
				if(pre==i-3)
				{
					ans+=1.0*cur/100;
				}
				else ans+=cur;
				cur=0;
			}
			else continue;
		}
		else
			cur=cur*10+c;
	}
	ll tmp=(ll)ans;
	string res="";
	int cnt=0;
	string res2="";
	if(ans>tmp)
	{
		res2=".";
		res2+='0'+((ll)(ans*10))%10;
		res2+='0'+((ll)(ans*100))%10;
	}
	while(tmp!=0)
	{
		res+=('0'+tmp%10);
		tmp/=10;
		cnt++;
		if(tmp&&cnt==3)
		{
			res+='.';
			cnt=0;
		}
	}
	reverse(res.begin(),res.end());
	if(res.length()==0) res="0";
	cout<<res;
	cout<<res2<<endl;
    return 0;
}


/* ***********************************************
Author        :yuanzhaolin
Created Time  :2016年10月17日 星期一 20时48分39秒
File Name     :b.cpp
************************************************ */

#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <sstream>
#include <map>
#include <string>
#include <cmath>
#include <stdlib.h>
#include <time.h>
#include <queue>
#include <utility>
using namespace std;
#define repp(i,a,b) for(int i=a;i<=b;i++)
#define rep(i,a) for(int i=0;i<a;i++)
#define REP(i,a) for(int i=1;i<=a;i++)
#define per(i,a,b) for(int i=a-1;i>=b;i--)
#define foreach(i,a) for(int i=head[a];i>=0;i=ee[i].next)
#define Foreach(i,a) for(__typeof((a).begin())i=(a).begin();i!=(a).end();i++)
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define mp make_pair
#define m0(x) memset(x,0,sizeof(x))
#define mff(x) memset(x,0xff,sizeof(x))
#define fi first
#define se second
#define lson k<<1,l,(l+r)/2
#define rson k<<1|1,(l+r)/2+1,r
#define chl (k<<1)
#define chr (k<<1|1)
#define SZ(x) ((int)(x).size())
#define showtime fprintf(stderr,"time = %.15f\n",clock() / (double)CLOCKS_PER_SEC)
#define sqr(x) ((x)*(x))
#define C1(x) cout<<x<<endl
#define C2(x,y) cout<<x<<" "<<y<<endl
#define C3(x,y,z) cout<<x<<" "<<y<<" "<<z<<endl
typedef long long ll;
typedef vector<int> VI;
typedef pair<int,int> PII;
typedef vector< pair<int,int> > VPII;
const ll mod=1e9+7;
const ll maxn=1e5+7;
const ll maxe=1e6+7;
const ll INF=1e9+7;
const double PI=acos(-1);
int dx[4]={0,0,1,-1};
int dy[4]={-1,1,0,0};
inline void Max(int &a,int b){
   if(b>a)a=b;
}
inline void Min(int &a,int b){
  if(a==-1||b<a)a=b;
}
int n;
string S;
int main()
{
    //freopen("in.txt","r",stdin);
    //freopen("out.txt","w",stdout);
   	cin>>S;
   	S=S+'c';
   	double ans=0;
   	double cur=0;
   	int pre=-INF;
   	for(int i=0;i<S.length();i++)
	{
		if(S[i]=='.')
		{
			pre=i;
			continue;
		}
		int c=S[i]-'0';
		if(c<0||c>9)
		{
			if(cur!=0)
			{
				cout<<cur<<" "<<pre<<endl;
				if(pre==i-3)
				{
					ans+=1.0*cur/100;
				}
				else ans+=cur;
				cur=0;
			}
			else continue;
		}
		else
			cur=cur*10+c;
	}
	printf("%3f\n",ans);
	ll tmp=(ll)ans;
	string res="";
	int cnt=0;
	string res2="";
	if(ans>tmp)
	{
		res2=".";
		res2+=('0'+((ll)(ans*10))%10);
		res2+=('0'+((ll)(ans*100))%10);
	}
	while(tmp!=0)
	{
		res+=('0'+tmp%10);
		tmp/=10;
		cnt++;
		if(tmp&&cnt==3)
		{
			res+='.';
			cnt=0;
		}
	}
	reverse(res.begin(),res.end());
	if(res.length()==0) res="0";
	cout<<res;
	cout<<res2<<endl;
    return 0;
}


/* ***********************************************
Author        :yuanzhaolin
Created Time  :2016年10月17日 星期一 20时48分39秒
File Name     :b.cpp
************************************************ */

#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <sstream>
#include <map>
#include <string>
#include <cmath>
#include <stdlib.h>
#include <time.h>
#include <queue>
#include <utility>
using namespace std;
#define repp(i,a,b) for(int i=a;i<=b;i++)
#define rep(i,a) for(int i=0;i<a;i++)
#define REP(i,a) for(int i=1;i<=a;i++)
#define per(i,a,b) for(int i=a-1;i>=b;i--)
#define foreach(i,a) for(int i=head[a];i>=0;i=ee[i].next)
#define Foreach(i,a) for(__typeof((a).begin())i=(a).begin();i!=(a).end();i++)
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define mp make_pair
#define m0(x) memset(x,0,sizeof(x))
#define mff(x) memset(x,0xff,sizeof(x))
#define fi first
#define se second
#define lson k<<1,l,(l+r)/2
#define rson k<<1|1,(l+r)/2+1,r
#define chl (k<<1)
#define chr (k<<1|1)
#define SZ(x) ((int)(x).size())
#define showtime fprintf(stderr,"time = %.15f\n",clock() / (double)CLOCKS_PER_SEC)
#define sqr(x) ((x)*(x))
#define C1(x) cout<<x<<endl
#define C2(x,y) cout<<x<<" "<<y<<endl
#define C3(x,y,z) cout<<x<<" "<<y<<" "<<z<<endl
typedef long long ll;
typedef vector<int> VI;
typedef pair<int,int> PII;
typedef vector< pair<int,int> > VPII;
const ll mod=1e9+7;
const ll maxn=1e5+7;
const ll maxe=1e6+7;
const ll INF=1e9+7;
const double PI=acos(-1);
const double eps=1e-7;
int dx[4]={0,0,1,-1};
int dy[4]={-1,1,0,0};
inline void Max(int &a,int b){
   if(b>a)a=b;
}
inline void Min(int &a,int b){
  if(a==-1||b<a)a=b;
}
int n;
string S;
int main()
{
    //freopen("in.txt","r",stdin);
    //freopen("out.txt","w",stdout);
   	cin>>S;
   	S=S+'c';
   	double ans=0;
   	double cur=0;
   	int pre=-INF;
   	for(int i=0;i<S.length();i++)
	{
		if(S[i]=='.')
		{
			pre=i;
			continue;
		}
		int c=S[i]-'0';
		if(c<0||c>9)
		{
			if(cur!=0)
			{
				if(pre==i-3)
				{
					ans+=1.0*cur/100;
				}
				else ans+=cur;
				cur=0;
			}
			else continue;
		}
		else
			cur=cur*10+c;
	}
	ll tmp=(ll)ans;
	string res="";
	int cnt=0;
	string res2="";
	if(ans>tmp)
	{
		res2=".";
		ans+=0.005;
		res2+=('0'+((ll)(ans*10+eps))%10);
		res2+=('0'+((ll)(ans*100+eps))%10);
	}
	while(tmp!=0)
	{
		res+=('0'+tmp%10);
		tmp/=10;
		cnt++;
		if(tmp&&cnt==3)
		{
			res+='.';
			cnt=0;
		}
	}
	reverse(res.begin(),res.end());
	if(res.length()==0) res="0";
	cout<<res;
	cout<<res2<<endl;
    return 0;
}


/* ***********************************************
Author        :yuanzhaolin
Created Time  :2016年10月17日 星期一 20时48分39秒
File Name     :b.cpp
************************************************ */

#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <sstream>
#include <map>
#include <string>
#include <cmath>
#include <stdlib.h>
#include <time.h>
#include <queue>
#include <utility>
using namespace std;
#define repp(i,a,b) for(int i=a;i<=b;i++)
#define rep(i,a) for(int i=0;i<a;i++)
#define REP(i,a) for(int i=1;i<=a;i++)
#define per(i,a,b) for(int i=a-1;i>=b;i--)
#define foreach(i,a) for(int i=head[a];i>=0;i=ee[i].next)
#define Foreach(i,a) for(__typeof((a).begin())i=(a).begin();i!=(a).end();i++)
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define mp make_pair
#define m0(x) memset(x,0,sizeof(x))
#define mff(x) memset(x,0xff,sizeof(x))
#define fi first
#define se second
#define lson k<<1,l,(l+r)/2
#define rson k<<1|1,(l+r)/2+1,r
#define chl (k<<1)
#define chr (k<<1|1)
#define SZ(x) ((int)(x).size())
#define showtime fprintf(stderr,"time = %.15f\n",clock() / (double)CLOCKS_PER_SEC)
#define sqr(x) ((x)*(x))
#define C1(x) cout<<x<<endl
#define C2(x,y) cout<<x<<" "<<y<<endl
#define C3(x,y,z) cout<<x<<" "<<y<<" "<<z<<endl
typedef long long ll;
typedef vector<int> VI;
typedef pair<int,int> PII;
typedef vector< pair<int,int> > VPII;
const ll mod=1e9+7;
const ll maxn=1e5+7;
const ll maxe=1e6+7;
const ll INF=1e9+7;
const double PI=acos(-1);
const double eps=1e-7;
int dx[4]={0,0,1,-1};
int dy[4]={-1,1,0,0};
inline void Max(int &a,int b){
   if(b>a)a=b;
}
inline void Min(int &a,int b){
  if(a==-1||b<a)a=b;
}
int n;
string S;
int main()
{
    //freopen("in.txt","r",stdin);
    //freopen("out.txt","w",stdout);
   	cin>>S;
   	S=S+'c';
   	double ans=0;
   	double cur=0;
   	int pre=-INF;
   	for(int i=0;i<S.length();i++)
	{
		if(S[i]=='.')
		{
			pre=i;
			continue;
		}
		int c=S[i]-'0';
		if(c<0||c>9)
		{
			if(cur!=0)
			{
				if(pre==i-3)
				{
					ans+=1.0*cur/100;
				}
				else ans+=cur;
				cur=0;
			}
			else continue;
		}
		else
			cur=cur*10+c;
	}
	ll tmp=(ll)ans;
	string res="";
	int cnt=0;
	string res2="";
	if(ans>tmp)
	{
		res2=".";
		res2+=('0'+((ll)(ans*10+eps))%10);
		res2+=('0'+((ll)(ans*100+eps))%10);
	}
	while(tmp!=0)
	{
		res+=('0'+tmp%10);
		tmp/=10;
		cnt++;
		if(tmp&&cnt==3)
		{
			res+='.';
			cnt=0;
		}
	}
	reverse(res.begin(),res.end());
	if(res.length()==0) res="0";
	cout<<res;
	cout<<res2<<endl;
    return 0;
}


#include<bits/stdc++.h>

#define F first
#define S second
#define mp make_pair
#define pii pair<int,int>
// mikty prikoldar
#define ll long long
#define pb push_back
#define sz(a) (int)(a.size())
#define Accepted 0
#define endl '\n'
//everything goes according to the plan
#define y1 		 NOT
#define left   NEEDED
#define right  THINGS
//countdown BEGAN. 10 , 9 , 8 ...
const int Mod = (int)1e9 + 7;
const int MX = 1073741822;
const ll MXLL = 9223372036854775807;
const int Sz = 1110111;
// ai dyn dyn dyn dirindai ai dyn dyn dirindai
using namespace std;
// skr skr skr v chernih naikah
inline void Read_rap () {	// smoke weed everyday
  ios_base :: sync_with_stdio(0);
	cin.tie(0);
}
ll cent, money;

string s;

int main()
{
	Read_rap ();
	cin >> s;

	int d = 0, num = 0;
	for (int i = 0;i < sz(s);i ++) {
		if (isalpha (s[i])) {
			if (d == 2) {
				cent += num % 100;
				num /= 100;
			}
			money += num;
			d = num = 0;
		}
			else
			{
				if (s[i] == '.')	d = 0;
					else {
						d ++;
						num = num * 10 + (s[i] - '0');
					}
			}
	}
	if (d == 2) {
		cent += num % 100;
		num /= 100;
	}
	money += num;
	string ans = "";

	if (cent) {
	  ans += char (cent % 10) + '0';
	  ans += char (cent / 10) + '0';
		ans += '.';
	}

	for (int i = 1;money || i == 1;i ++) {
		ans += char(money % 10) + '0';
		money /= 10;

		if (i % 3 == 0)	ans += '.';
	}
	reverse (ans.begin(), ans.end());

	cout << ans;

	return Accepted;
}

// Coded by Z...


#include<bits/stdc++.h>

#define F first
#define S second
#define mp make_pair
#define pii pair<int,int>
// mikty prikoldar
#define ll long long
#define pb push_back
#define sz(a) (int)(a.size())
#define Accepted 0
#define endl '\n'
//everything goes according to the plan
#define y1 		 NOT
#define left   NEEDED
#define right  THINGS
//countdown BEGAN. 10 , 9 , 8 ...
const int Mod = (int)1e9 + 7;
const int MX = 1073741822;
const ll MXLL = 9223372036854775807;
const int Sz = 1110111;
// ai dyn dyn dyn dirindai ai dyn dyn dirindai
using namespace std;
// skr skr skr v chernih naikah
inline void Read_rap () {	// smoke weed everyday
  ios_base :: sync_with_stdio(0);
	cin.tie(0);
}
ll cent, money;

string s;

int main()
{
	Read_rap ();
	cin >> s;

	int d = 0, num = 0;
	bool dot = 0;
	for (int i = 0;i < sz(s);i ++) {
		if (isalpha (s[i])) {
			if (d == 2 && dot) {
				cent += num % 100;
				num /= 100;
			}
			money += num;
			d = num = dot = 0;
		}
			else
			{
				if (s[i] == '.')	d = 0, dot = 1;
					else {
						if (dot)	d ++;
						num = num * 10 + (s[i] - '0');
					}
			}
	}
	if (d == 2 && dot) {
		cent += num % 100;
		num /= 100;
	}
	money += num;
	string ans = "";
	money += cent / 100;
	cent %= 100;

	if (cent) {
		ans += char (cent % 10) + '0';
	  ans += char (cent / 10) + '0';
		ans += '.';
	}

	for (int i = 1;money || i == 1;i ++) {
		ans += char(money % 10) + '0';
		money /= 10;

		if (i % 3 == 0 && money)	ans += '.';
	}
	reverse (ans.begin(), ans.end());

	cout << ans;

	return Accepted;
}

// Coded by Z...


#include<bits/stdc++.h>

#define F first
#define S second
#define mp make_pair
#define pii pair<int,int>
// mikty prikoldar
#define ll long long
#define pb push_back
#define sz(a) (int)(a.size())
#define Accepted 0
#define endl '\n'
//everything goes according to the plan
#define y1 		 NOT
#define left   NEEDED
#define right  THINGS
//countdown BEGAN. 10 , 9 , 8 ...
const int Mod = (int)1e9 + 7;
const int MX = 1073741822;
const ll MXLL = 9223372036854775807;
const int Sz = 1110111;
// ai dyn dyn dyn dirindai ai dyn dyn dirindai
using namespace std;
// skr skr skr v chernih naikah
inline void Read_rap () {	// smoke weed everyday
  ios_base :: sync_with_stdio(0);
	cin.tie(0);
}
ll cent, money;

string s;

int main()
{
	Read_rap ();
	cin >> s;

	int d = 0, num = 0;
	bool dot = 0;
	for (int i = 0;i < sz(s);i ++) {
		if (isalpha (s[i])) {
			if (d == 2 && dot) {
				cent += num % 100;
				num /= 100;
			}
			money += num;
			d = num = dot = 0;
		}
			else
			{
				if (s[i] == '.')	d = 0, dot = 1;
					else {
						if (dot)	d ++;
						num = num * 10 + (s[i] - '0');
					}
			}
	}
	if (d == 2 && dot) {
		cent += num % 100;
		num /= 100;
	}
	money += num;
	string ans = "";

	if (cent) {
		money += cent / 100;
		cent %= 100;
	  ans += char (cent % 10) + '0';
	  ans += char (cent / 10) + '0';
		ans += '.';
	}

	for (int i = 1;money || i == 1;i ++) {
		ans += char(money % 10) + '0';
		money /= 10;

		if (i % 3 == 0 && money)	ans += '.';
	}
	reverse (ans.begin(), ans.end());

	cout << ans;

	return Accepted;
}

// Coded by Z...


#include<bits/stdc++.h>

#define F first
#define S second
#define mp make_pair
#define pii pair<int,int>
// mikty prikoldar
#define ll long long
#define pb push_back
#define sz(a) (int)(a.size())
#define Accepted 0
#define endl '\n'
//everything goes according to the plan
#define y1 		 NOT
#define left   NEEDED
#define right  THINGS
//countdown BEGAN. 10 , 9 , 8 ...
const int Mod = (int)1e9 + 7;
const int MX = 1073741822;
const ll MXLL = 9223372036854775807;
const int Sz = 1110111;
// ai dyn dyn dyn dirindai ai dyn dyn dirindai
using namespace std;
// skr skr skr v chernih naikah
inline void Read_rap () {	// smoke weed everyday
  ios_base :: sync_with_stdio(0);
	cin.tie(0);
}
int n;

int cnt[10];

string size[6] = {"S", "M", "L", "XL", "XXL", "XXXL"};

int ans[Sz];

int a[Sz], b[Sz];

int get_size (string &s) {
	for (int i = 0;i < 6;i ++)
		if (size[i] == s)	return i;
}

int main()
{
	Read_rap ();
	for (int i = 0;i < 6;i ++)	cin >> cnt[i];

	cin >> n;

	for (int i = 1;i <= n;i ++) {
		string s;	cin >> s;

		a[i] = b[i] = -1;
		string f = "";
		for (auto c : s) {
			if (c == ',') {
				a[i] = get_size (f);
				f = "";
			}
				else	f += c;
		}
		b[i] = get_size (f);
	}
	for (int i = 1;i <= n;i ++)
		if (a[i] == -1) {
			ans[i] = b[i];
			cnt[ans[i]] --;
		}

	for (int i = 1;i <= n;i ++) {
		if (a[i] != -1) {
			if (cnt[a[i]] <= cnt[b[i]]) {
				ans[i] = b[i];
				cnt[b[i]] --;
			}
				else
				{
					ans[i] = a[i];
					cnt[a[i]] --;
				}
		}
	}
	for (int i = 1;i <= n;i ++) {
		if (a[i] != -1 && cnt[ans[i]] < 0) {
			cnt[ans[i]] ++;
			if (ans[i] == a[i])
				ans[i] = b[i];
					else
						ans[i] = a[i];
			cnt[ans[i]] --;
		}
	}
	for (int i = 1;i <= n;i ++) {
		if (a[i] != -1 && cnt[ans[i]] < 0) {
			cnt[ans[i]] ++;
			if (ans[i] == a[i])
				ans[i] = b[i];
					else
						ans[i] = a[i];
			cnt[ans[i]] --;
		}
	}

	for (int i = 0;i < 6;i ++)
		if (cnt[i] < 0) {
			cout << "NO";
			return 0;
		}
	cout << "YES\n";

	for (int i = 1;i <= n;i ++)
		cout << size[ans[i]] << endl;

	return Accepted;
}

// Coded by Z...


#include<bits/stdc++.h>

#define F first
#define S second
#define mp make_pair
#define pii pair<int,int>
// mikty prikoldar
#define ll long long
#define pb push_back
#define sz(a) (int)(a.size())
#define Accepted 0
#define endl '\n'
//everything goes according to the plan
#define y1 		 NOT
#define left   NEEDED
#define right  THINGS
//countdown BEGAN. 10 , 9 , 8 ...
const int Mod = (int)1e9 + 7;
const int MX = 1073741822;
const ll MXLL = 9223372036854775807;
const int Sz = 1110111;
// ai dyn dyn dyn dirindai ai dyn dyn dirindai
using namespace std;
// skr skr skr v chernih naikah
inline void Read_rap () {	// smoke weed everyday
  ios_base :: sync_with_stdio(0);
	cin.tie(0);
}
ll cent, money;

string s;

int main()
{
	Read_rap ();
	cin >> s;

	int d = 0, num = 0;
	bool dot = 0;
	for (int i = 0;i < sz(s);i ++) {
		if (isalpha (s[i])) {
			if (d == 2 && dot) {
				cent += num % 100;
				num /= 100;
			}
			money += num;
			d = num = dot = 0;
		}
			else
			{
				if (s[i] == '.')	d = 0, dot = 1;
					else {
						if (dot)	d ++;
						num = num * 10 + (s[i] - '0');
					}
			}
	}
	if (d == 2) {
		cent += num % 100;
		num /= 100;
	}
	money += num;
	string ans = "";

	if (cent) {
		money += cent / 100;
		cent %= 100;
	  ans += char (cent % 10) + '0';
	  ans += char (cent / 10) + '0';
		ans += '.';
	}

	for (int i = 1;money || i == 1;i ++) {
		ans += char(money % 10) + '0';
		money /= 10;

		if (i % 3 == 0 && money)	ans += '.';
	}
	reverse (ans.begin(), ans.end());

	cout << ans;

	return Accepted;
}

// Coded by Z...


#include <cstdio>
#include <algorithm>
#include <vector>
#include <climits>
#include <cstring>
#include <bitset>
#include <cmath>

#define f first
#define s second
#define pb push_back
#define NMAX 100000
#define mp make_pair
#define pii pair <int, int>

using namespace std;

char str[1024], buffer[NMAX + 10];
int bufpoz = NMAX + 10;

inline void get (int &n);

inline void scr (int x, int OK)
{
    if (!x) return;
    scr (x / 1000, false);

    printf ("%d", x % 1000);
    if (!OK) printf (".");
}

inline void establish (double &sum)
{
    double x = sum * 1000.0;
    int xx = floor (x);
    int c = xx % 10;

    if (c >= 5)
        xx += 10;

    xx /= 10;
    sum = 1.0 * xx / 100;
}

int main ()
{
    //freopen ("file.in", "r", stdin);

    gets (str + 1);
    int n = strlen (str + 1);

    double sum = 0.0, nr = 0.0;
    int dec = 0, lg = 0;
    bool dot = true;

    for (int i = 1; i <= n; ++i)
    {
        if ('a' <= str[i] && str[i] <= 'z')
        {
            if (lg)
            {
                if (dot && lg == 2) nr += 1.0 * dec / 100.0;
                else nr = nr * 1000.0 + dec;

                sum += nr;
                nr = 0.0;
            }

            dot = false;
            lg = dec = 0;
            continue;
        }

        if (str[i] == '.')
        {
            dot = true;
            nr = nr * 1000.0 + dec;
            dec = lg = 0;
            continue;
        }

        ++lg;
        dec = dec * 10 + str[i] - 48;
    }

    if (dot && lg == 2) nr += 1.0 * dec / 100.0;
    else nr = nr * 1000.0 + dec;

    sum += nr;
    nr = 0.0;

    establish (sum);

    int ss = floor (sum);
    if (!ss) printf ("0");
    scr (ss, true);

    sum *= 100.0;
    ss = floor (sum);
    if (ss % 100)
    {
        printf (".");
        ss = ss % 100;
        if (!(ss / 10)) printf ("0");
        printf ("%d", ss);
    }

    return 0;
}

inline void get (int &n)
{
    n = 0;
    if (bufpoz > NMAX)
        fread (buffer, 1, NMAX, stdin), bufpoz = 0;

    int semn = 1;
    while ('0' > buffer[bufpoz] || buffer[bufpoz] > '9')
    {
        if (buffer[bufpoz] == '-') semn = -1;

        if (++bufpoz == NMAX)
            fread (buffer, 1, NMAX, stdin), bufpoz = 0;
    }

    while ('0' <= buffer[bufpoz] && buffer[bufpoz] <= '9')
    {
        n = n * 10 + buffer[bufpoz] - 48;
        if (++bufpoz == NMAX)
            fread (buffer, 1, NMAX, stdin), bufpoz = 0;
    }

    n *= semn;
}


#include <cstdio>
#include <algorithm>
#include <vector>
#include <climits>
#include <cstring>
#include <bitset>
#include <cmath>

#define f first
#define s second
#define pb push_back
#define NMAX 100000
#define mp make_pair
#define pii pair <int, int>

using namespace std;

char str[1024], buffer[NMAX + 10];
int bufpoz = NMAX + 10;

inline void get (int &n);

inline void scr (long long x, int OK)
{
    if (!x) return;
    scr (x / 1000LL, false);

    if (x / 1000LL > 0)
    {
        long long cx = x % 1000LL;
        if (!(cx / 100LL)) printf ("0");
        if (!(cx / 10LL)) printf ("0");
    }

    printf ("%I64d", x % 1000LL);
    if (!OK) printf (".");
}

inline long long establish (double sum)
{
    double x = sum * 1000.0;
    long long xx = floor (x);
    long long c = xx % 10LL;

    if (c >= 5LL)
        xx += 10LL;

    xx /= 10LL;
}

int main ()
{
    ///freopen ("file.in", "r", stdin);

    gets (str + 1);
    int n = strlen (str + 1);

    double sum = 0.0, nr = 0.0;
    int dec = 0, lg = 0;
    bool dot = true;

    for (int i = 1; i <= n; ++i)
    {
        if ('a' <= str[i] && str[i] <= 'z')
        {
            if (lg)
            {
                if (dot && lg == 2) nr += 1.0 * dec / 100.0;
                else nr = nr * 1000.0 + dec;

                sum += nr;
                nr = 0.0;
            }

            dot = false;
            lg = dec = 0;
            continue;
        }

        if (str[i] == '.')
        {
            dot = true;
            nr = nr * 1000.0 + dec;
            dec = lg = 0;
            continue;
        }

        ++lg;
        dec = dec * 10 + str[i] - 48;
    }

    if (dot && lg == 2) nr += 1.0 * dec / 100.0;
    else nr = nr * 1000.0 + dec;

    sum += nr;
    nr = 0.0;

    long long xx = establish (sum);
    long long ss = xx / 100LL;

    if (!ss) printf ("0");
    scr (ss, true);

    ss = xx % 100LL;
    if (ss)
    {
        printf (".");
        if (!(ss / 10LL)) printf ("0");
        printf ("%I64d", ss);
    }

    return 0;
}

inline void get (int &n)
{
    n = 0;
    if (bufpoz > NMAX)
        fread (buffer, 1, NMAX, stdin), bufpoz = 0;

    int semn = 1;
    while ('0' > buffer[bufpoz] || buffer[bufpoz] > '9')
    {
        if (buffer[bufpoz] == '-') semn = -1;

        if (++bufpoz == NMAX)
            fread (buffer, 1, NMAX, stdin), bufpoz = 0;
    }

    while ('0' <= buffer[bufpoz] && buffer[bufpoz] <= '9')
    {
        n = n * 10 + buffer[bufpoz] - 48;
        if (++bufpoz == NMAX)
            fread (buffer, 1, NMAX, stdin), bufpoz = 0;
    }

    n *= semn;
}


#include <cstdio>
#include <algorithm>
#include <vector>
#include <climits>
#include <cstring>
#include <bitset>
#include <cmath>

#define f first
#define s second
#define pb push_back
#define NMAX 100000
#define mp make_pair
#define pii pair <int, int>

using namespace std;

char str[1024], buffer[NMAX + 10];
int bufpoz = NMAX + 10;

inline void get (int &n);

inline void scr (long long x, int OK)
{
    if (!x) return;
    scr (x / 1000LL, false);

    if (x / 1000LL > 0)
    {
        int cx = x % 1000LL;
        if (!(cx / 100LL)) printf ("0");
        if (!(cx / 10LL)) printf ("0");
    }

    printf ("%I64d", x % 1000LL);
    if (!OK) printf (".");
}

inline long long establish (double sum)
{
    double x = sum * 1000.0;
    long long xx = floor (x);
    long long c = xx % 10LL;

    if (c >= 5LL)
        xx += 10LL;

    xx /= 10LL;
}

int main ()
{
    ///freopen ("file.in", "r", stdin);

    gets (str + 1);
    int n = strlen (str + 1);

    double sum = 0.0, nr = 0.0;
    int dec = 0, lg = 0;
    bool dot = true;

    for (int i = 1; i <= n; ++i)
    {
        if ('a' <= str[i] && str[i] <= 'z')
        {
            if (lg)
            {
                if (dot && lg == 2) nr += 1.0 * dec / 100.0;
                else nr = nr * 1000.0 + dec;

                sum += nr;
                nr = 0.0;
            }

            dot = false;
            lg = dec = 0;
            continue;
        }

        if (str[i] == '.')
        {
            dot = true;
            nr = nr * 1000.0 + dec;
            dec = lg = 0;
            continue;
        }

        ++lg;
        dec = dec * 10 + str[i] - 48;
    }

    if (dot && lg == 2) nr += 1.0 * dec / 100.0;
    else nr = nr * 1000.0 + dec;

    sum += nr;
    nr = 0.0;

    long long xx = establish (sum);
    long long ss = xx / 100;

    if (!ss) printf ("0");
    scr (ss, true);

    ss = xx % 100LL;
    if (ss)
    {
        printf (".");
        if (!(ss / 10LL)) printf ("0");
        printf ("%I64d", ss);
    }

    return 0;
}

inline void get (int &n)
{
    n = 0;
    if (bufpoz > NMAX)
        fread (buffer, 1, NMAX, stdin), bufpoz = 0;

    int semn = 1;
    while ('0' > buffer[bufpoz] || buffer[bufpoz] > '9')
    {
        if (buffer[bufpoz] == '-') semn = -1;

        if (++bufpoz == NMAX)
            fread (buffer, 1, NMAX, stdin), bufpoz = 0;
    }

    while ('0' <= buffer[bufpoz] && buffer[bufpoz] <= '9')
    {
        n = n * 10 + buffer[bufpoz] - 48;
        if (++bufpoz == NMAX)
            fread (buffer, 1, NMAX, stdin), bufpoz = 0;
    }

    n *= semn;
}


#include <cstdio>
#include <algorithm>
#include <vector>
#include <climits>
#include <cstring>
#include <bitset>
#include <cmath>

#define f first
#define s second
#define pb push_back
#define NMAX 100000
#define mp make_pair
#define pii pair <int, int>

using namespace std;

char str[1024], buffer[NMAX + 10];
int bufpoz = NMAX + 10;

inline void get (int &n);

inline void scr (long long x, int OK)
{
    if (!x) return;
    scr (x / 1000LL, false);

    if (x / 1000LL > 0)
    {
        int cx = x % 1000LL;
        if (!(cx / 100LL)) printf ("0");
        if (!(cx / 10LL)) printf ("0");
    }

    printf ("%I64d", x % 1000LL);
    if (!OK) printf (".");
}

inline long long establish (double sum)
{
    double x = sum * 1000.0;
    long long xx = floor (x);
    long long c = xx % 10LL;

    if (c >= 5LL)
        xx += 10LL;

    xx /= 10LL;
}

int main ()
{
    //freopen ("file.in", "r", stdin);

    gets (str + 1);
    int n = strlen (str + 1);

    double sum = 0.0, nr = 0.0;
    int dec = 0, lg = 0;
    bool dot = true;

    for (int i = 1; i <= n; ++i)
    {
        if ('a' <= str[i] && str[i] <= 'z')
        {
            if (lg)
            {
                if (dot && lg == 2) nr += 1.0 * dec / 100.0;
                else nr = nr * 1000.0 + dec;

                sum += nr;
                nr = 0.0;
            }

            dot = false;
            lg = dec = 0;
            continue;
        }

        if (str[i] == '.')
        {
            dot = true;
            nr = nr * 1000.0 + dec;
            dec = lg = 0;
            continue;
        }

        ++lg;
        dec = dec * 10 + str[i] - 48;
    }

    if (dot && lg == 2) nr += 1.0 * dec / 100.0;
    else nr = nr * 1000.0 + dec;

    sum += nr;
    nr = 0.0;

    long long xx = establish (sum);
    long long ss = xx / 100;

    if (!ss) printf ("0");
    scr (ss, true);

    ss = xx % 100LL;
    if (ss)
    {
        printf (".");
        if (!(ss / 10LL)) printf ("0");
        printf ("%I64d", ss);
    }

    return 0;
}

inline void get (int &n)
{
    n = 0;
    if (bufpoz > NMAX)
        fread (buffer, 1, NMAX, stdin), bufpoz = 0;

    int semn = 1;
    while ('0' > buffer[bufpoz] || buffer[bufpoz] > '9')
    {
        if (buffer[bufpoz] == '-') semn = -1;

        if (++bufpoz == NMAX)
            fread (buffer, 1, NMAX, stdin), bufpoz = 0;
    }

    while ('0' <= buffer[bufpoz] && buffer[bufpoz] <= '9')
    {
        n = n * 10 + buffer[bufpoz] - 48;
        if (++bufpoz == NMAX)
            fread (buffer, 1, NMAX, stdin), bufpoz = 0;
    }

    n *= semn;
}


#include <cstdio>
#include <algorithm>
#include <vector>
#include <climits>
#include <cstring>
#include <bitset>
#include <cmath>

#define f first
#define s second
#define pb push_back
#define NMAX 100000
#define mp make_pair
#define pii pair <int, int>

using namespace std;

char str[1024], buffer[NMAX + 10];
int bufpoz = NMAX + 10;

inline void get (int &n);

inline void scr (int x, int OK)
{
    if (!x) return;
    scr (x / 1000, false);

    if (x / 1000 > 0)
    {
        long long cx = x % 1000;
        if (!(cx / 100)) printf ("0");
        if (!(cx / 10)) printf ("0");
    }

    printf ("%d", x % 1000);
    if (!OK) printf (".");
}

inline long long establish (double sum)
{
    double x = sum * 1000.0;
    long long xx = floor (x);
    long long c = xx % 10LL;

    if (c >= 5LL)
        xx += 10LL;

    xx /= 10LL;
}

int main ()
{
    //freopen ("file.in", "r", stdin);

    gets (str + 1);
    int n = strlen (str + 1);

    double sum = 0.0, nr = 0.0;
    int dec = 0, lg = 0;
    bool dot = true;

    for (int i = 1; i <= n; ++i)
    {
        if ('a' <= str[i] && str[i] <= 'z')
        {
            if (lg)
            {
                if (dot && lg == 2) nr += 1.0 * dec / 100.0;
                else nr = nr * 1000.0 + dec;

                sum += nr;
                nr = 0.0;
            }

            dot = false;
            lg = dec = 0;
            continue;
        }

        if (str[i] == '.')
        {
            dot = true;
            nr = nr * 1000.0 + dec;
            dec = lg = 0;
            continue;
        }

        ++lg;
        dec = dec * 10 + str[i] - 48;
    }

    if (dot && lg == 2) nr += 1.0 * dec / 100.0;
    else nr = nr * 1000.0 + dec;

    sum += nr;
    nr = 0.0;

    long long xx = establish (sum);
    int ss = (int)(xx / 100LL);

    if (!ss) printf ("0");
    scr (ss, true);

    ss = (int)(xx % 100LL);
    if (ss)
    {
        printf (".");
        if (!(ss / 10)) printf ("0");
        printf ("%d", ss);
    }

    return 0;
}

inline void get (int &n)
{
    n = 0;
    if (bufpoz > NMAX)
        fread (buffer, 1, NMAX, stdin), bufpoz = 0;

    int semn = 1;
    while ('0' > buffer[bufpoz] || buffer[bufpoz] > '9')
    {
        if (buffer[bufpoz] == '-') semn = -1;

        if (++bufpoz == NMAX)
            fread (buffer, 1, NMAX, stdin), bufpoz = 0;
    }

    while ('0' <= buffer[bufpoz] && buffer[bufpoz] <= '9')
    {
        n = n * 10 + buffer[bufpoz] - 48;
        if (++bufpoz == NMAX)
            fread (buffer, 1, NMAX, stdin), bufpoz = 0;
    }

    n *= semn;
}


#include <cstdio>
#include <algorithm>
#include <vector>
#include <climits>
#include <cstring>
#include <bitset>
#include <cmath>

#define f first
#define s second
#define pb push_back
#define NMAX 100000
#define mp make_pair
#define pii pair <int, int>

using namespace std;

char str[1024], buffer[NMAX + 10];
int bufpoz = NMAX + 10;

inline void get (int &n);

inline void scr (long long x, int OK)
{
    if (!x) return;
    scr (x / 1000LL, false);

    if (x / 1000LL > 0)
    {
        long long cx = x % 1000LL;
        if (!(cx / 100LL)) printf ("0");
        if (!(cx / 10LL)) printf ("0");
    }

    printf ("%I64d", x % 1000LL);
    if (!OK) printf (".");
}

inline long long establish (double sum)
{
    double x = sum * 1000.0;
    long long xx = floor (x);
    long long c = xx % 10LL;

    if (c >= 5LL)
        xx += 10LL;

    xx /= 10LL;
}

int main ()
{
    ///freopen ("file.in", "r", stdin);

    gets (str + 1);
    int n = strlen (str + 1);

    double sum = 0.0, nr = 0.0;
    int dec = 0, lg = 0;
    bool dot = true;

    for (int i = 1; i <= n; ++i)
    {
        if ('a' <= str[i] && str[i] <= 'z')
        {
            if (lg)
            {
                if (dot && lg == 2) nr += 1.0 * dec / 100.0;
                else nr = nr * 1000.0 + dec;

                sum += nr;
                nr = 0.0;
            }

            dot = false;
            lg = dec = 0;
            continue;
        }

        if (str[i] == '.')
        {
            dot = true;
            nr = nr * 1000.0 + dec;
            dec = lg = 0;
            continue;
        }

        ++lg;
        dec = dec * 10 + str[i] - 48;
    }

    if (dot && lg == 2) nr += 1.0 * dec / 100.0;
    else nr = nr * 1000.0 + dec;

    sum += nr;
    nr = 0.0;

    long long xx = establish (sum);
    long long ss = xx / 100;

    if (!ss) printf ("0");
    scr (ss, true);

    ss = xx % 100LL;
    if (ss)
    {
        printf (".");
        if (!(ss / 10LL)) printf ("0");
        printf ("%I64d", ss);
    }

    return 0;
}

inline void get (int &n)
{
    n = 0;
    if (bufpoz > NMAX)
        fread (buffer, 1, NMAX, stdin), bufpoz = 0;

    int semn = 1;
    while ('0' > buffer[bufpoz] || buffer[bufpoz] > '9')
    {
        if (buffer[bufpoz] == '-') semn = -1;

        if (++bufpoz == NMAX)
            fread (buffer, 1, NMAX, stdin), bufpoz = 0;
    }

    while ('0' <= buffer[bufpoz] && buffer[bufpoz] <= '9')
    {
        n = n * 10 + buffer[bufpoz] - 48;
        if (++bufpoz == NMAX)
            fread (buffer, 1, NMAX, stdin), bufpoz = 0;
    }

    n *= semn;
}


#include <cstdio>
#include <algorithm>
#include <vector>
#include <climits>
#include <cstring>
#include <bitset>
#include <cmath>

#define f first
#define s second
#define pb push_back
#define NMAX 100000
#define mp make_pair
#define pii pair <int, int>

using namespace std;

char str[1024], buffer[NMAX + 10];
int bufpoz = NMAX + 10;

inline void get (int &n);

inline void scr (int x, int OK)
{
    if (!x) return;
    scr (x / 1000, false);

    if (x / 1000 > 0)
    {
        int cx = x % 1000;
        if (!(cx / 100)) printf ("0");
        if (!(cx / 10)) printf ("0");
    }

    printf ("%d", x % 1000);
    if (!OK) printf (".");
}

inline void establish (double &sum)
{
    double x = sum * 1000.0;
    long long xx = floor (x);
    long long c = xx % 10LL;

    if (c >= 5LL)
        xx += 10LL;

    xx /= 10LL;
    sum = 1.0 * xx / 100;
}

int main ()
{
   // freopen ("file.in", "r", stdin);

    gets (str + 1);
    int n = strlen (str + 1);

    double sum = 0.0, nr = 0.0;
    int dec = 0, lg = 0;
    bool dot = true;

    for (int i = 1; i <= n; ++i)
    {
        if ('a' <= str[i] && str[i] <= 'z')
        {
            if (lg)
            {
                if (dot && lg == 2) nr += 1.0 * dec / 100.0;
                else nr = nr * 1000.0 + dec;

                sum += nr;
                nr = 0.0;
            }

            dot = false;
            lg = dec = 0;
            continue;
        }

        if (str[i] == '.')
        {
            dot = true;
            nr = nr * 1000.0 + dec;
            dec = lg = 0;
            continue;
        }

        ++lg;
        dec = dec * 10 + str[i] - 48;
    }

    if (dot && lg == 2) nr += 1.0 * dec / 100.0;
    else nr = nr * 1000.0 + dec;

    sum += nr;
    nr = 0.0;

    establish (sum);

    int ss = floor (sum);
    if (!ss) printf ("0");
    scr (ss, true);

    sum *= 100.0;
    ss = floor (sum);
    if (ss % 100)
    {
        printf (".");
        ss = ss % 100;
        if (!(ss / 10)) printf ("0");
        printf ("%d", ss);
    }

    return 0;
}

inline void get (int &n)
{
    n = 0;
    if (bufpoz > NMAX)
        fread (buffer, 1, NMAX, stdin), bufpoz = 0;

    int semn = 1;
    while ('0' > buffer[bufpoz] || buffer[bufpoz] > '9')
    {
        if (buffer[bufpoz] == '-') semn = -1;

        if (++bufpoz == NMAX)
            fread (buffer, 1, NMAX, stdin), bufpoz = 0;
    }

    while ('0' <= buffer[bufpoz] && buffer[bufpoz] <= '9')
    {
        n = n * 10 + buffer[bufpoz] - 48;
        if (++bufpoz == NMAX)
            fread (buffer, 1, NMAX, stdin), bufpoz = 0;
    }

    n *= semn;
}


#include <cstdio>
#include <algorithm>
#include <vector>
#include <climits>
#include <cstring>
#include <bitset>
#include <cmath>

#define f first
#define s second
#define pb push_back
#define NMAX 100000
#define mp make_pair
#define pii pair <int, int>

using namespace std;

char str[1024], buffer[NMAX + 10];
int bufpoz = NMAX + 10;

inline void get (int &n);

inline void scr (int x, int OK)
{
    if (!x) return;
    scr (x / 1000, false);

    printf ("%d", x % 1000);
    if (!OK) printf (".");
}

int main ()
{
  //  freopen ("file.in", "r", stdin);

    gets (str + 1);
    int n = strlen (str + 1);

    double sum = 0.0, nr = 0.0;
    int dec = 0, lg = 0;
    bool dot = true;

    for (int i = 1; i <= n; ++i)
    {
        if ('a' <= str[i] && str[i] <= 'z')
        {
            if (lg)
            {
                if (dot && lg == 2) nr += 1.0 * dec / 100.0;
                else nr = nr * 1000.0 + dec;

                sum += nr;
                nr = 0.0;
            }

            dot = false;
            lg = dec = 0;
            continue;
        }

        if (str[i] == '.')
        {
            dot = true;
            nr = nr * 1000.0 + dec;
            dec = lg = 0;
            continue;
        }

        ++lg;
        dec = dec * 10 + str[i] - 48;
    }

    if (dot && lg == 2) nr += 1.0 * dec / 100.0;
    else nr = nr * 1000.0 + dec;

    sum += nr;
    nr = 0.0;

    int ss = floor (sum);
    if (!ss) printf ("0");
    scr (ss, true);

    sum *= 100.0;
    ss = floor (sum);
    if (ss % 100)
    {
        printf (".");
        ss = ss % 100;
        if (!(ss / 10)) printf ("0");
        printf ("%d", ss);
    }

    return 0;
}

inline void get (int &n)
{
    n = 0;
    if (bufpoz > NMAX)
        fread (buffer, 1, NMAX, stdin), bufpoz = 0;

    int semn = 1;
    while ('0' > buffer[bufpoz] || buffer[bufpoz] > '9')
    {
        if (buffer[bufpoz] == '-') semn = -1;

        if (++bufpoz == NMAX)
            fread (buffer, 1, NMAX, stdin), bufpoz = 0;
    }

    while ('0' <= buffer[bufpoz] && buffer[bufpoz] <= '9')
    {
        n = n * 10 + buffer[bufpoz] - 48;
        if (++bufpoz == NMAX)
            fread (buffer, 1, NMAX, stdin), bufpoz = 0;
    }

    n *= semn;
}


#include <cstdio>
#include <algorithm>
#include <vector>
#include <climits>
#include <cstring>
#include <bitset>
#include <cmath>

#define f first
#define s second
#define pb push_back
#define NMAX 100000
#define mp make_pair
#define pii pair <int, int>

using namespace std;

char str[1024], buffer[NMAX + 10];
int bufpoz = NMAX + 10;

inline void get (int &n);

inline void scr (long long x, int OK)
{
    if (!x) return;
    scr (x / 1000LL, false);

    if (x / 1000LL > 0)
    {
        int cx = x % 1000LL;
        if (!(cx / 100LL)) printf ("0");
        if (!(cx / 10LL)) printf ("0");
    }

    printf ("%I64d", x % 1000LL);
    if (!OK) printf (".");
}

inline void establish (double &sum)
{
    double x = sum * 1000.0;
    long long xx = floor (x);
    long long c = xx % 10LL;

    if (c >= 5LL)
        xx += 10LL;

    xx /= 10LL;
    sum = 1.0 * xx / 100;
}

int main ()
{
  //  freopen ("file.in", "r", stdin);

    gets (str + 1);
    int n = strlen (str + 1);

    double sum = 0.0, nr = 0.0;
    int dec = 0, lg = 0;
    bool dot = true;

    for (int i = 1; i <= n; ++i)
    {
        if ('a' <= str[i] && str[i] <= 'z')
        {
            if (lg)
            {
                if (dot && lg == 2) nr += 1.0 * dec / 100.0;
                else nr = nr * 1000.0 + dec;

                sum += nr;
                nr = 0.0;
            }

            dot = false;
            lg = dec = 0;
            continue;
        }

        if (str[i] == '.')
        {
            dot = true;
            nr = nr * 1000.0 + dec;
            dec = lg = 0;
            continue;
        }

        ++lg;
        dec = dec * 10 + str[i] - 48;
    }

    if (dot && lg == 2) nr += 1.0 * dec / 100.0;
    else nr = nr * 1000.0 + dec;

    sum += nr;
    nr = 0.0;

    establish (sum);

    long long ss = floor (sum);
    if (!ss) printf ("0");
    scr (ss, true);

    sum *= 100.0;
    ss = floor (sum);
    if (ss % 100LL)
    {
        printf (".");
        ss = ss % 100LL;
        if (!(ss / 10LL)) printf ("0");
        printf ("%I64d", ss);
    }

    return 0;
}

inline void get (int &n)
{
    n = 0;
    if (bufpoz > NMAX)
        fread (buffer, 1, NMAX, stdin), bufpoz = 0;

    int semn = 1;
    while ('0' > buffer[bufpoz] || buffer[bufpoz] > '9')
    {
        if (buffer[bufpoz] == '-') semn = -1;

        if (++bufpoz == NMAX)
            fread (buffer, 1, NMAX, stdin), bufpoz = 0;
    }

    while ('0' <= buffer[bufpoz] && buffer[bufpoz] <= '9')
    {
        n = n * 10 + buffer[bufpoz] - 48;
        if (++bufpoz == NMAX)
            fread (buffer, 1, NMAX, stdin), bufpoz = 0;
    }

    n *= semn;
}


#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>

using namespace std;

char str[1024];

inline void scr (int x, int OK)
{
    if (!x) return;
    scr (x / 1000, false);

    if (x / 1000 > 0)
    {
        long long cx = x % 1000;
        if (!(cx / 100)) printf ("0");
        if (!(cx / 10)) printf ("0");
    }

    printf ("%d", x % 1000);
    if (!OK) printf (".");
}

inline long long establish (double sum)
{
    double x = sum * 1000.0;
    long long xx = floor (x);
    long long c = xx % 10LL;

    if (c >= 5LL)
        xx += 10LL;

    xx /= 10LL;
}

int main ()
{
    //freopen ("file.in", "r", stdin);

    gets (str + 1);
    int n = strlen (str + 1);

    double sum = 0.0, nr = 0.0;
    int dec = 0, lg = 0;
    bool dot = true;

    for (int i = 1; i <= n; ++i)
    {
        if ('a' <= str[i] && str[i] <= 'z')
        {
            if (lg)
            {
                if (dot && lg == 2) nr += 1.0 * dec / 100.0;
                else nr = nr * 1000.0 + dec;

                sum += nr;
                nr = 0.0;
            }

            dot = false;
            lg = dec = 0;
            continue;
        }

        if (str[i] == '.')
        {
            dot = true;
            nr = nr * 1000.0 + dec;
            dec = lg = 0;
            continue;
        }

        ++lg;
        dec = dec * 10 + str[i] - 48;
    }

    if (dot && lg == 2) nr += 1.0 * dec / 100.0;
    else nr = nr * 1000.0 + dec;

    sum += nr;
    nr = 0.0;

    long long xx = establish (sum);
    int ss = (int)(xx / 100LL);

    if (!ss) printf ("0");
    scr (ss, true);

    ss = (int)(xx % 100LL);
    if (ss)
    {
        printf (".");
        if (!(ss / 10)) printf ("0");
        printf ("%d", ss);
    }

    return 0;
}


#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>

using namespace std;

char str[1024];

inline void scr (int x, int OK)
{
    if (!x) return;
    scr (x / 1000, false);

    if (x / 1000 > 0)
    {
        long long cx = x % 1000;
        if (!(cx / 100)) printf ("0");
        if (!(cx / 10)) printf ("0");
    }

    printf ("%d", x % 1000);
    if (!OK) printf (".");
}

inline long long establish (double sum)
{
    double x = sum * 1000.0;
    long long xx = floor (x);
    long long c = xx % 10LL;

    if (c >= 5LL)
        xx += 10LL;

    xx /= 10LL;

    return xx;
}

int main ()
{
    //freopen ("file.in", "r", stdin);

    gets (str + 1);
    int n = strlen (str + 1);

    double sum = 0.0, nr = 0.0;
    int dec = 0, lg = 0;
    bool dot = true;

    for (int i = 1; i <= n; ++i)
    {
        if ('a' <= str[i] && str[i] <= 'z')
        {
            if (lg)
            {
                if (dot && lg == 2) nr += 1.0 * dec / 100.0;
                else nr = nr * 1000.0 + dec;

                sum += nr;
                nr = 0.0;
            }

            dot = false;
            lg = dec = 0;
            continue;
        }

        if (str[i] == '.')
        {
            dot = true;
            nr = nr * 1000.0 + dec;
            dec = lg = 0;
            continue;
        }

        ++lg;
        dec = dec * 10 + str[i] - 48;
    }

    if (dot && lg == 2) nr += 1.0 * dec / 100.0;
    else nr = nr * 1000.0 + dec;

    sum += nr;
    nr = 0.0;

    long long xx = establish (sum);
    int ss = (int)(xx / 100LL);

    if (!ss) printf ("0");
    scr (ss, true);

    ss = (int)(xx % 100LL);
    if (ss)
    {
        printf (".");
        if (!(ss / 10)) printf ("0");
        printf ("%d", ss);
    }

    return 0;
}


#include<bits/stdc++.h>
#include<iostream>
#include<cmath>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<string>
#include<queue>
#include<vector>

#define ll long long
using namespace std;
//-Wl,--stack=67108864
//struct node{int ;}p[M];
string s;
double ts(int a,int b){
	if(b-a==8){
		return 1000000;
	}
	int i=0,j=0;
	string ss;
	for(i=a;i<=b;++i){
		ss+=s[i];
	}
	int numd=0,posd=-1;
	for(i=0;i<ss.size();++i){
		if(ss[i]=='.'){
			numd++;
			posd=i;
		}
	}
	string tn="";
	double num0=0;
	if(numd==2){
		for(i=0;i<ss.size()&&ss[i]!='.';++i){
			tn+=ss[i];
		}
		for(i++;i<ss.size()&&ss[i]!='.';++i){
			tn+=ss[i];
		}
		num0+=stoi(tn);
	//	cout<<tn<<endl;
		i++;
		double xiao=0.1*(ss[i]-'0')+0.01*(ss[i+1]-'0');
		num0+=xiao;
	}
	else if(numd==1){
		int len=ss.size();
		if(len-posd==4){
			for(i=0;i<ss.size()&&ss[i]!='.';++i){
				tn+=ss[i];
			}
			i++;
			for(;i<ss.size();++i){
				tn+=ss[i];
			}
			num0+=stoi(tn);
	//		cout<<tn<<endl;
		}
		else{
			for(i=0;i<ss.size()&&ss[i]!='.';++i){
				tn+=ss[i];
			}
			i++;
			num0+=stoi(tn);
		//	cout<<tn<<endl;
			double xiao=0.1*(ss[i]-'0')+0.01*(ss[i+1]-'0');
		//	cout<<ss[i]<<endl;
			num0+=xiao;
		}
	}
	else{
		for(i=0;i<ss.size();++i){
			tn+=ss[i];
		}
		num0+=stoi(tn);
	//	cout<<tn<<endl;
	}
	return num0;
}
int main(){
//	ios::sync_with_stdio(0);
//	cin.tie(0);
	cin>>s;
	int i,j,pr,k=0;
	double ans=0;
	string name[1010],tt="",shu="";
	int a=0,b=0;
	for(i=0;i<s.size();++i){
		if(s[i]>='0'&&s[i]<='9'){
			a=i;
			for(j=i+1;j<s.size();++j){
				if(s[j]>='a'&&s[j]<='z'||j==s.size()-1){
					if(j==s.size()-1)
						b=j;
					else b=j-1;
					break;
				}
			}
			ans+=ts(a,b);
//			cout<<ans<<endl;
			i=b;
		//	cout<<b<<endl;
		}
	}
//	cout<<ans<<endl;
//	ans=100000000;
//	ans=12438.32;
	if(ans>=1000&&ans<1000000){
		int ans1=(int)(ans/1000);
//		int wei=1;
		int ans0=0;
//		cout<<ans1<<endl;
/*		while(ans1>0){
			ans0+=ans1%10/wei;
			ans1/=10;
			wei*=10;
		}*/
		cout<<ans1<<'.';
	//	cout<<ans-1000*ans1;
		double anss=ans-1000*ans1;
	//	cout<<anss<<endl;
//		if(anss==0) cout<<"000";
		if(anss<10) cout<<"00";
		else if(anss<100) cout<<'0';
		if((int)anss==anss) cout<<anss;
		else printf("%.2lf\n",anss);
	}
	else if(ans>=1000000){
		int ans1=(int)(ans/1000000);
		int ans0=0;
		cout<<ans1<<'.';
		int ans3=(int)(ans)%1000000;
		int ans2=(int)(ans3/1000);
//		if(ans2==0) cout<<"000";
		if(ans2<10) cout<<"00";
		else if(ans2<100) cout<<'0';
		cout<<ans2<<'.';
		double ans00=ans-1000*ans2-1000000*ans1;
//		if(ans00==0) cout<<"000";
		if(ans00<10) cout<<"00";
		else if(ans00<100) cout<<'0';
		if((int)ans00==ans00) cout<<ans00;
		else printf("%.2lf\n",ans00);
	}
	else{
		if((int)ans==ans) cout<<ans;
		else printf("%.2lf\n",ans);
	}
	return 0;
}


#include<bits/stdc++.h>
#include<iostream>
#include<cmath>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<string>
#include<queue>
#include<vector>

#define ll long long
using namespace std;
//-Wl,--stack=67108864
//struct node{int ;}p[M];
string s;
double ts(int a,int b){
	if(b-a==8){
		return 1000000;
	}
	int i=0,j=0;
	string ss;
	for(i=a;i<=b;++i){
		ss+=s[i];
	}
	int numd=0,posd=-1;
	for(i=0;i<ss.size();++i){
		if(ss[i]=='.'){
			numd++;
			posd=i;
		}
	}
	string tn="";
	double num0=0;
	if(numd==2){
		for(i=0;i<ss.size()&&ss[i]!='.';++i){
			tn+=ss[i];
		}
		for(i++;i<ss.size()&&ss[i]!='.';++i){
			tn+=ss[i];
		}
		num0+=stoi(tn);
	//	cout<<tn<<endl;
		i++;
		double xiao=0.1*(ss[i]-'0')+0.01*(ss[i+1]-'0');
		num0+=xiao;
	}
	else if(numd==1){
		int len=ss.size();
		if(len-posd==4){
			for(i=0;i<ss.size()&&ss[i]!='.';++i){
				tn+=ss[i];
			}
			i++;
			for(;i<ss.size();++i){
				tn+=ss[i];
			}
			num0+=stoi(tn);
	//		cout<<tn<<endl;
		}
		else{
			for(i=0;i<ss.size()&&ss[i]!='.';++i){
				tn+=ss[i];
			}
			i++;
			num0+=stoi(tn);
		//	cout<<tn<<endl;
			double xiao=0.1*(ss[i]-'0')+0.01*(ss[i+1]-'0');
		//	cout<<ss[i]<<endl;
			num0+=xiao;
		}
	}
	else{
		for(i=0;i<ss.size();++i){
			tn+=ss[i];
		}
		num0+=stoi(tn);
	//	cout<<tn<<endl;
	}
	return num0;
}
int main(){
//	ios::sync_with_stdio(0);
//	cin.tie(0);
	cin>>s;
	int i,j,pr,k=0;
	double ans=0;
	string name[1010],tt="",shu="";
	int a=0,b=0;
	for(i=0;i<s.size();++i){
		if(s[i]>='0'&&s[i]<='9'){
			a=i;
			for(j=i+1;j<s.size();++j){
				if(s[j]>='a'&&s[j]<='z'||j==s.size()-1){
					if(j==s.size()-1)
						b=j;
					else b=j-1;
					break;
				}
			}
			ans+=ts(a,b);
//			cout<<ans<<endl;
			i=b;
		//	cout<<b<<endl;
		}
	}
//	cout<<ans<<endl;
//	ans=100000000;
//	ans=12438.32;
	if(ans>=1000&&ans<1000000){
		int ans1=(int)(ans/1000);
//		int wei=1;
		int ans0=0;
//		cout<<ans1<<endl;
/*		while(ans1>0){
			ans0+=ans1%10/wei;
			ans1/=10;
			wei*=10;
		}*/
		cout<<ans1<<'.';
	//	cout<<ans-1000*ans1;
		double anss=ans-1000*ans1;
	//	cout<<anss<<endl;
//		if(anss==0) cout<<"000";
		if(anss<10) cout<<"00";
		else if(anss<100) cout<<'0';
		if((int)anss==anss) cout<<anss;
		else printf("%.2lf\n",anss);
	}
	else if(ans>=1000000){
		int ans1=(int)(ans/1000000);
		int ans0=0;
		cout<<ans1<<'.';
		int ans3=(int)(ans)%1000000;
		int ans2=(int)(ans3/1000);
//		if(ans2==0) cout<<"000";
		if(ans2<10) cout<<"00";
		else if(ans2<100) cout<<'0';
		cout<<ans2<<'.';
		double ans00=ans-1000*ans2-1000000*ans1;
//		if(ans00==0) cout<<"000";
		if(ans00<10) cout<<"00";
		else if(ans00<100) cout<<'0';
		if((int)ans00==ans00) cout<<ans00;
		else printf("%.2lf\n",ans00);
	}
	else printf("%.2lf\n",ans);
	return 0;
}


#include<bits/stdc++.h>
#include<iostream>
#include<cmath>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<string>
#include<queue>
#include<vector>

#define ll long long
using namespace std;
//-Wl,--stack=67108864
//struct node{int ;}p[M];
string s;
double ts(int a,int b){
	if(s[a]=='1'&&s[a]=='.'&&s[a]=='0'&&s[a]=='0'&&s[a]=='0'&&s[a]=='.'&&s[a]=='0'&&s[a]=='0'&&s[a]=='0'){
		return 1000000;
	}
	int i=0,j=0;
	string ss;
	for(i=a;i<=b;++i){
		ss+=s[i];
	}
	int numd=0,posd=-1;
	for(i=0;i<ss.size();++i){
		if(ss[i]=='.'){
			numd++;
			posd=i;
		}
	}
	string tn="";
	double num0=0;
	if(numd==2){
		for(i=0;i<ss.size()&&ss[i]!='.';++i){
			tn+=ss[i];
		}
		for(i++;i<ss.size()&&ss[i]!='.';++i){
			tn+=ss[i];
		}
		num0+=stoi(tn);
	//	cout<<tn<<endl;
		i++;
		double xiao=0.1*(ss[i]-'0')+0.01*(ss[i+1]-'0');
		num0+=xiao;
	}
	else if(numd==1){
		int len=ss.size();
		if(len-posd==4){
			for(i=0;i<ss.size()&&ss[i]!='.';++i){
				tn+=ss[i];
			}
			i++;
			for(;i<ss.size();++i){
				tn+=ss[i];
			}
			num0+=stoi(tn);
	//		cout<<tn<<endl;
		}
		else{
			for(i=0;i<ss.size()&&ss[i]!='.';++i){
				tn+=ss[i];
			}
			i++;
			num0+=stoi(tn);
		//	cout<<tn<<endl;
			double xiao=0.1*(ss[i]-'0')+0.01*(ss[i+1]-'0');
		//	cout<<ss[i]<<endl;
			num0+=xiao;
		}
	}
	else{
		for(i=0;i<ss.size();++i){
			tn+=ss[i];
		}
		num0+=stoi(tn);
	//	cout<<tn<<endl;
	}
	return num0;
}
int main(){
//	ios::sync_with_stdio(0);
//	cin.tie(0);
	cin>>s;
	int i,j,pr,k=0;
	double ans=0;
	string name[1010],tt="",shu="";
	int a=0,b=0;
	for(i=0;i<s.size();++i){
		if(s[i]>='0'&&s[i]<='9'){
			a=i;
			for(j=i+1;j<s.size();++j){
				if(s[j]>='a'&&s[j]<='z'||j==s.size()-1){
					if(j==s.size()-1)
						b=j;
					else b=j-1;
					break;
				}
			}
			ans+=ts(a,b);
//			cout<<ans<<endl;
			i=b;
		//	cout<<b<<endl;
		}
	}
//	cout<<ans<<endl;
//	ans=100000000;
//	ans=12438.32;
	if(ans>=1000&&ans<1000000){
		int ans1=(int)(ans/1000);
//		int wei=1;
		int ans0=0;
//		cout<<ans1<<endl;
/*		while(ans1>0){
			ans0+=ans1%10/wei;
			ans1/=10;
			wei*=10;
		}*/
		cout<<ans1<<'.';
	//	cout<<ans-1000*ans1;
		double anss=ans-1000*ans1;
	//	cout<<anss<<endl;
//		if(anss==0) cout<<"000";
		if(anss<10) cout<<"00";
		else if(anss<100) cout<<'0';
		if((int)anss==anss) cout<<anss;
		else printf("%.2lf\n",anss);
	}
	else if(ans>=1000000){
		int ans1=(int)(ans/1000000);
		int ans0=0;
		cout<<ans1<<'.';
		int ans3=(int)(ans)%1000000;
		int ans2=(int)(ans3/1000);
//		if(ans2==0) cout<<"000";
		if(ans2<10) cout<<"00";
		else if(ans2<100) cout<<'0';
		cout<<ans2<<'.';
		double ans00=ans-1000*ans2-1000000*ans1;
//		if(ans00==0) cout<<"000";
		if(ans00<10) cout<<"00";
		else if(ans00<100) cout<<'0';
		if((int)ans00==ans00) cout<<ans00;
		else printf("%.2lf\n",ans00);
	}
	else{
		if((int)ans==ans) cout<<ans;
		else printf("%.2lf\n",ans);
	}
	return 0;
}


#include<bits/stdc++.h>
#include<iostream>
#include<cmath>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<string>
#include<queue>
#include<vector>

#define ll long long
using namespace std;
//-Wl,--stack=67108864
//struct node{int ;}p[M];
string s;
double ts(int a,int b){
	int i=0,j=0;
	string ss;
	for(i=a;i<=b;++i){
		ss+=s[i];
	}
	int numd=0,posd=-1;
	for(i=0;i<ss.size();++i){
		if(ss[i]=='.'){
			numd++;
			posd=i;
		}
	}
	string tn="";
	double num0=0;
	if(numd==2){
		for(i=0;i<ss.size()&&ss[i]!='.';++i){
			tn+=ss[i];
		}
		for(i++;i<ss.size()&&ss[i]!='.';++i){
			tn+=ss[i];
		}
		num0+=stoi(tn);
	//	cout<<tn<<endl;
		i++;
		double xiao=0.1*(ss[i]-'0')+0.01*(ss[i+1]-'0');
		num0+=xiao;
	}
	else if(numd==1){
		int len=ss.size();
		if(len-posd==4){
			for(i=0;i<ss.size()&&ss[i]!='.';++i){
				tn+=ss[i];
			}
			i++;
			for(;i<ss.size();++i){
				tn+=ss[i];
			}
			num0+=stoi(tn);
	//		cout<<tn<<endl;
		}
		else{
			for(i=0;i<ss.size()&&ss[i]!='.';++i){
				tn+=ss[i];
			}
			i++;
			num0+=stoi(tn);
		//	cout<<tn<<endl;
			double xiao=0.1*(ss[i]-'0')+0.01*(ss[i+1]-'0');
		//	cout<<ss[i]<<endl;
			num0+=xiao;
		}
	}
	else{
		for(i=0;i<ss.size();++i){
			tn+=ss[i];
		}
		num0+=stoi(tn);
	//	cout<<tn<<endl;
	}
	return num0;
}
int main(){
//	ios::sync_with_stdio(0);
//	cin.tie(0);
	cin>>s;
	int i,j,pr,k=0;
	double ans=0;
	string name[1010],tt="",shu="";
	int a=0,b=0;
	for(i=0;i<s.size();++i){
		if(s[i]>='0'&&s[i]<='9'){
			a=i;
			for(j=i+1;j<s.size();++j){
				if(s[j]>='a'&&s[j]<='z'||j==s.size()-1){
					if(j==s.size()-1)
						b=j;
					else b=j-1;
					break;
				}
			}
			ans+=ts(a,b);
//			cout<<ans<<endl;
			i=b;
		//	cout<<b<<endl;
		}
	}
//	cout<<ans<<endl;
//	ans=100000000;
//	ans=12438.32;
	if(ans>=1000&&ans<1000000){
		int ans1=(int)(ans/1000);
//		int wei=1;
		int ans0=0;
//		cout<<ans1<<endl;
/*		while(ans1>0){
			ans0+=ans1%10/wei;
			ans1/=10;
			wei*=10;
		}*/
		cout<<ans1<<'.';
	//	cout<<ans-1000*ans1;
		double anss=ans-1000*ans1;
	//	cout<<anss<<endl;
//		if(anss==0) cout<<"000";
		if(anss<10) cout<<"00";
		else if(anss<100) cout<<'0';
		printf("%.2lf\n",anss);
	}
	else if(ans>=1000000){
		int ans1=(int)(ans/1000000);
		int ans0=0;
		cout<<ans1<<'.';
		int ans3=(int)(ans)%1000000;
		int ans2=(int)(ans3/1000);
//		if(ans2==0) cout<<"000";
		if(ans2<10) cout<<"00";
		else if(ans2<100) cout<<'0';
		cout<<ans2<<'.';
		double ans00=ans-1000*ans2-1000000*ans1;
//		if(ans00==0) cout<<"000";
		if(ans00<10) cout<<"00";
		else if(ans00<100) cout<<'0';
		printf("%.2lf\n",ans00);
	}
	else printf("%.2lf\n",ans);
	return 0;
}


#include<bits/stdc++.h>
#include<iostream>
#include<cmath>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<string>
#include<queue>
#include<vector>

#define ll long long
using namespace std;
//-Wl,--stack=67108864
//struct node{int ;}p[M];
string s;
double ts(int a,int b){
	if(b-a==8){
		return 1000000;
	}
	int i=0,j=0;
	string ss;
	for(i=a;i<=b;++i){
		ss+=s[i];
	}
	int numd=0,posd=-1;
	for(i=0;i<ss.size();++i){
		if(ss[i]=='.'){
			numd++;
			posd=i;
		}
	}
	string tn="";
	double num0=0;
	if(numd==2){
		for(i=0;i<ss.size()&&ss[i]!='.';++i){
			tn+=ss[i];
		}
		for(i++;i<ss.size()&&ss[i]!='.';++i){
			tn+=ss[i];
		}
		num0+=stoi(tn);
	//	cout<<tn<<endl;
		i++;
		double xiao=0.1*(ss[i]-'0')+0.01*(ss[i+1]-'0');
		num0+=xiao;
	}
	else if(numd==1){
		int len=ss.size();
		if(len-posd==4){
			for(i=0;i<ss.size()&&ss[i]!='.';++i){
				tn+=ss[i];
			}
			i++;
			for(;i<ss.size();++i){
				tn+=ss[i];
			}
			num0+=stoi(tn);
	//		cout<<tn<<endl;
		}
		else{
			for(i=0;i<ss.size()&&ss[i]!='.';++i){
				tn+=ss[i];
			}
			i++;
			num0+=stoi(tn);
		//	cout<<tn<<endl;
			double xiao=0.1*(ss[i]-'0')+0.01*(ss[i+1]-'0');
		//	cout<<ss[i]<<endl;
			num0+=xiao;
		}
	}
	else{
		for(i=0;i<ss.size();++i){
			tn+=ss[i];
		}
		num0+=stoi(tn);
	//	cout<<tn<<endl;
	}
	return num0;
}
int main(){
//	ios::sync_with_stdio(0);
//	cin.tie(0);
	cin>>s;
	int i,j,pr,k=0;
	double ans=0;
	string name[1010],tt="",shu="";
	int a=0,b=0;
	for(i=0;i<s.size();++i){
		if(s[i]>='0'&&s[i]<='9'){
			a=i;
			for(j=i+1;j<s.size();++j){
				if(s[j]>='a'&&s[j]<='z'||j==s.size()-1){
					if(j==s.size()-1)
						b=j;
					else b=j-1;
					break;
				}
			}
			ans+=ts(a,b);
//			cout<<ans<<endl;
			i=b;
		//	cout<<b<<endl;
		}
	}
//	cout<<ans<<endl;
//	ans=100000000;
//	ans=12438.32;
	if(ans>=1000&&ans<1000000){
		int ans1=(int)(ans/1000);
//		int wei=1;
		int ans0=0;
//		cout<<ans1<<endl;
/*		while(ans1>0){
			ans0+=ans1%10/wei;
			ans1/=10;
			wei*=10;
		}*/
		cout<<ans1<<'.';
	//	cout<<ans-1000*ans1;
		double anss=ans-1000*ans1;
	//	cout<<anss<<endl;
//		if(anss==0) cout<<"000";
		if(anss<10) cout<<"00";
		else if(anss<100) cout<<'0';
		printf("%.2lf\n",anss);
	}
	else if(ans>=1000000){
		int ans1=(int)(ans/1000000);
		int ans0=0;
		cout<<ans1<<'.';
		int ans3=(int)(ans)%1000000;
		int ans2=(int)(ans3/1000);
//		if(ans2==0) cout<<"000";
		if(ans2<10) cout<<"00";
		else if(ans2<100) cout<<'0';
		cout<<ans2<<'.';
		double ans00=ans-1000*ans2-1000000*ans1;
//		if(ans00==0) cout<<"000";
		if(ans00<10) cout<<"00";
		else if(ans00<100) cout<<'0';
		printf("%.2lf\n",ans00);
	}
	else printf("%.2lf\n",ans);
	return 0;
}


#include<bits/stdc++.h>
#include<iostream>
#include<cmath>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<string>
#include<queue>
#include<vector>

#define ll long long
using namespace std;
//-Wl,--stack=67108864
//struct node{int ;}p[M];
string s;
double ts(int a,int b){
	if(s[a]=='1'&&s[a+1]=='.'&&s[a+2]=='0'&&s[a+3]=='0'&&s[a+4]=='0'&&s[a+5]=='.'&&s[a+6]=='0'&&s[a+7]=='0'&&s[a+8]=='0'){
		return 1000000;
	}
	int i=0,j=0;
	string ss;
	for(i=a;i<=b;++i){
		ss+=s[i];
	}
	int numd=0,posd=-1;
	for(i=0;i<ss.size();++i){
		if(ss[i]=='.'){
			numd++;
			posd=i;
		}
	}
	string tn="";
	double num0=0;
	if(numd==2){
		for(i=0;i<ss.size()&&ss[i]!='.';++i){
			tn+=ss[i];
		}
		for(i++;i<ss.size()&&ss[i]!='.';++i){
			tn+=ss[i];
		}
		num0+=stoi(tn);
	//	cout<<tn<<endl;
		i++;
		double xiao=0.1*(ss[i]-'0')+0.01*(ss[i+1]-'0');
		num0+=xiao;
	}
	else if(numd==1){
		int len=ss.size();
		if(len-posd==4){
			for(i=0;i<ss.size()&&ss[i]!='.';++i){
				tn+=ss[i];
			}
			i++;
			for(;i<ss.size();++i){
				tn+=ss[i];
			}
			num0+=stoi(tn);
	//		cout<<tn<<endl;
		}
		else{
			for(i=0;i<ss.size()&&ss[i]!='.';++i){
				tn+=ss[i];
			}
			i++;
			num0+=stoi(tn);
		//	cout<<tn<<endl;
			double xiao=0.1*(ss[i]-'0')+0.01*(ss[i+1]-'0');
		//	cout<<ss[i]<<endl;
			num0+=xiao;
		}
	}
	else{
		for(i=0;i<ss.size();++i){
			tn+=ss[i];
		}
		num0+=stoi(tn);
	//	cout<<tn<<endl;
	}
	return num0;
}
int main(){
//	ios::sync_with_stdio(0);
//	cin.tie(0);
	cin>>s;
	int i,j,pr,k=0;
	double ans=0;
	string name[1010],tt="",shu="";
	int a=0,b=0;
	for(i=0;i<s.size();++i){
		if(s[i]>='0'&&s[i]<='9'){
			a=i;
			for(j=i+1;j<s.size();++j){
				if(s[j]>='a'&&s[j]<='z'||j==s.size()-1){
					if(j==s.size()-1)
						b=j;
					else b=j-1;
					break;
				}
			}
			ans+=ts(a,b);
//			cout<<ans<<endl;
			i=b;
		//	cout<<b<<endl;
		}
	}
//	cout<<ans<<endl;
//	ans=100000000;
//	ans=12438.32;
	if(ans>=1000&&ans<1000000){
		int ans1=(int)(ans/1000);
//		int wei=1;
		int ans0=0;
//		cout<<ans1<<endl;
/*		while(ans1>0){
			ans0+=ans1%10/wei;
			ans1/=10;
			wei*=10;
		}*/
		cout<<ans1<<'.';
	//	cout<<ans-1000*ans1;
		double anss=ans-1000*ans1;
	//	cout<<anss<<endl;
//		if(anss==0) cout<<"000";
		if(anss<10) cout<<"00";
		else if(anss<100) cout<<'0';
		if((int)anss==anss) cout<<anss;
		else printf("%.2lf\n",anss);
	}
	else if(ans>=1000000){
		int ans1=(int)(ans/1000000);
		int ans0=0;
		cout<<ans1<<'.';
		int ans3=(int)(ans)%1000000;
		int ans2=(int)(ans3/1000);
//		if(ans2==0) cout<<"000";
		if(ans2<10) cout<<"00";
		else if(ans2<100) cout<<'0';
		cout<<ans2<<'.';
		double ans00=ans-1000*ans2-1000000*ans1;
//		if(ans00==0) cout<<"000";
		if(ans00<10) cout<<"00";
		else if(ans00<100) cout<<'0';
		if((int)ans00==ans00) cout<<ans00;
		else printf("%.2lf\n",ans00);
	}
	else{
		if((int)ans==ans) cout<<ans;
		else printf("%.2lf\n",ans);
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;

const int  MOD=1000000007;
const int  INF= int(1e9);
const int  MAX=1007;
int dp[MAX],p[MAX],n;
int res;
inline void add(int &a, int b) {
    a += b;
    if (a >= MOD) a -= MOD;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin>>n;
    for(int i=1;i<=n;i++) {
        cin>>p[i];
    }
    for(int i=1;i<=n;i++) {
        dp[i]=2;
        for(int j=p[i];j<i;j++) {
            add(dp[i],dp[j]);
        }
        res+=dp[i];
    }
    cout<<res;

    return 0;

}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;

const int  MOD=1000000007;
const int  INF= int(1e9);
const int  MAX=1007;
int dp[MAX],p[MAX],n;
int res;
inline void add(int &a, int b) {
    a += b;
    if (a >= MOD) a -= MOD;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin>>n;
    for(int i=1;i<=n;i++) {
        cin>>p[i];
    }
    for(int i=1;i<=n;i++) {
        dp[i]=2;
        for(int j=p[i];j<i;j++) {
            add(dp[i],dp[j]);
        }
        add(res,dp[i]);
    }
    cout<<res;

    return 0;

}


#include<bits/stdc++.h>
#include<iostream>
using namespace std;
const int maxn=1000+5;
const int mod=1000000000+7;
int p[maxn];
long long dp[maxn];
int main()
{
    int i,n;
    cin>>n;
    for (i=1;i<=n;i++)
    cin>>p[i];
    dp[1]=0;
    for (int i=1;i<=n;i++)
    dp[i+1]=(2*dp[i]-dp[p[i]]+2+mod)%mod;
    cout<<dp[n+1]<<endl;
    return 0;
}


/*
ID: shsgerry1
PROG:
LANG: C++
*/
#include <bits/stdc++.h>
#define LL long long
#define MAXN 1002
const int INF = ~0U >> 1;
using namespace std;
int MOD = 1000000007;
int n;
int p[MAXN];
int cross[MAXN];
bool flag;
void bfs(int pos, int step){
	if(flag) return ;
	if(pos == n + 1) {
		cout << step % MOD << endl;
		flag = 1;
		return ;
	}
	cross[pos]++;
	if(cross[pos] % 2 == 1) {
		bfs(p[pos], step % MOD + 1);
	}
	else{
		bfs(pos + 1, step % MOD + 1);
	}
}
int main(){
	//freopen(".in", "r", stdin);
	//freopen(".out", "w", stdout);
	ios::sync_with_stdio(0);
	cin.tie(0);
	int x;
	cin >> n;
	for(int i = 1; i <= n; i++){
		cin >> p[i];
	}
	bfs(1, 0);
	return 0;
}


/*
ID: shsgerry1
PROG:
LANG: C++
*/
#include <bits/stdc++.h>
#define LL long long
#define MAXN 1002
const int INF = ~0U >> 1;
using namespace std;
int MOD = 1000000007;
int n;
int p[MAXN];
int cross[MAXN];
int ans;
bool flag;
/*void bfs(int pos, LL step){
	if(flag) return ;
	if(pos == n + 1) {
		cout << step % MOD << endl;
		flag = 1;
		return ;
	}
	cross[pos]++;
	if(cross[pos] % 2 == 1) {
		bfs(p[pos], step % MOD + 1);
	}
	else{
		bfs(pos + 1, step % MOD + 1);
	}
}*/
int main(){
	//freopen(".in", "r", stdin);
	//freopen(".out", "w", stdout);
	ios::sync_with_stdio(0);
	cin.tie(0);
	int x;
	cin >> n;
	for(int i = 1; i <= n; i++){
		cin >> p[i];
	}
	//bfs(1, 0);
	for(int i = 1; i <= n; i++){
		cross[i] = 2;
		for(int j = p[i]; j < i; j++){
			cross[i] += cross[j];
			cross[i] = cross[i] % MOD;
		}
		ans += cross[i];
		ans = ans % MOD;
	}
	cout << ans << endl;
	return 0;
}


//Ankur Jain
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define sz(a) (int)(a.size())
#define all(c) (c).begin(),(c).end()
#define F first
#define S second
#define si(n) scanf("%d",&n)
#define sll(n) scanf("%lld",&n)
#define REP(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
#define MOD 1000000007
#define PI 3.14159265359
#define endl '\n'
typedef long long int ll;
typedef vector<int> vi;
typedef pair<int,int > ii;
typedef vector<ii> vii;
typedef vector< vi > vvi;
typedef pair<long long,long long> pll;
typedef vector<long long> vll;
typedef priority_queue < ll , vector < ll > , greater < ll > > minheap;
typedef priority_queue < ll , vector < ll > , less < ll > > maxheap;
struct sort_pred {
		bool operator()(const std::pair<int,int> &left, const std::pair<int,int> &right)
				{
							return left.second < right.second;
								}
};
long long int gcd(long long int m, long long int n)
{
		if(n == 0)
					return m;
			return gcd(n, m % n);
}
ll powmod(ll a,ll b)
{
	if(b==0)return 1;
	ll x=powmod(a,b/2);
	ll y=(x*x)%MOD;
	if(b%2)
		return (a*y)%MOD;
	return y%MOD;
}
//Template ends here
int main()
{
	int n;
	si(n);
	int p[n+1];
	REP(i,1,n+1)
		si(p[i]);
	int dp[n+1];
	REP(i,1,n+1)
	{
		dp[i]=2;
		REP(j,p[i],i)
			dp[i]=(dp[i]%MOD + dp[j]%MOD)%MOD;
		//dp[i]=(dp[i]%MOD + 2%MOD)%MOD;
	}
	int ans=0;
	REP(i,1,n+1)
		ans=(ans%MOD+dp[i]%MOD)%MOD;
	printf("%d\n",ans);
	return 0;
}


//Ankur Jain
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define sz(a) (int)(a.size())
#define all(c) (c).begin(),(c).end()
#define F first
#define S second
#define si(n) scanf("%d",&n)
#define sll(n) scanf("%lld",&n)
#define REP(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
#define MOD 1000000007
#define PI 3.14159265359
#define endl '\n'
typedef long long int ll;
typedef vector<int> vi;
typedef pair<int,int > ii;
typedef vector<ii> vii;
typedef vector< vi > vvi;
typedef pair<long long,long long> pll;
typedef vector<long long> vll;
typedef priority_queue < ll , vector < ll > , greater < ll > > minheap;
typedef priority_queue < ll , vector < ll > , less < ll > > maxheap;
struct sort_pred {
		bool operator()(const std::pair<int,int> &left, const std::pair<int,int> &right)
				{
							return left.second < right.second;
								}
};
long long int gcd(long long int m, long long int n)
{
		if(n == 0)
					return m;
			return gcd(n, m % n);
}
ll powmod(ll a,ll b)
{
	if(b==0)return 1;
	ll x=powmod(a,b/2);
	ll y=(x*x)%MOD;
	if(b%2)
		return (a*y)%MOD;
	return y%MOD;
}
//Template ends here
int main()
{
	int n;
	si(n);
	int crosses[n+10],portal2[n+10];
	REP(i,1,n+1)
		si(portal2[i]);
	memset(crosses,0,sizeof(crosses));
	int curr=1;
	while(curr!=n+1)
	{
		crosses[curr]++;
		if(crosses[curr]%2!=0)
			curr=portal2[curr];
		else
			curr+=1;
	}
	ll cnt=0;
	REP(i,0,n+10)
		cnt=(cnt%MOD + crosses[i]%MOD)%MOD;
	printf("%lld\n",cnt );
	return 0;
}


#include<iostream>
#include<vector>

using namespace std;

int main(){
	int n;cin>>n;
	vector<int>p(n+1,0);
	for(int i=1;i<=n;i++){
		cin>>p[i];
	}
	//vector<int>dp(n+1,0);
	int d = 1000000007;
	vector<vector<int> >dp(n+2,vector<int>(2,0));
	dp[1][0] = 0;
	dp[1][1] = 0;
	for(int i=2;i<=n+1;i++){
		dp[i][0] = ((dp[i-1][0]%d+dp[i-1][1]%d)%d+2)%d;
		if(i != n+1)
		dp[i][1] = (dp[i][0]%d-dp[p[i]][0]%d+d)%d;
		//cout<<dp[i][0]<<" "<<dp[i][1]<<endl;
	}
	cout<<dp[n+1][0]<<endl;
	return 0;
}
//hellobig_tq//hello


/**
    Was it fate that made you lower your head, or was it yourself ?
**/
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int sz = 5e5 + 10;

struct ModInt {
    int val;
    int mod = 1e9 + 7;

    ModInt() { val = 0; }
    ModInt( int _val ) { val = _val % mod; }
    ModInt( long long _val ) { val = _val % mod; }

    ModInt& operator = ( int _val ) {
        val = _val % mod;
        return *this;
    }
    ModInt& operator = ( long long _val ) {
        val = _val % mod;
        return *this;
    }
    ModInt& operator = ( const ModInt& other ) {
        val = other.val % mod;
        return *this;
    }

    ModInt& operator += ( int _val ) {
        _val %= mod;
        val += _val;
        if( val >= mod ) val -= mod;
        return *this;
    }

    ModInt& operator += ( long long _val ) {
        _val %= mod;
        val += _val;
        if( val >= mod ) val -= mod;
        return *this;
    }

    ModInt& operator += ( const ModInt& other ) {
        int _val = other.val % mod;
        val += _val;
        if( val >= mod ) val -= mod;
        return *this;
    }

    friend ModInt operator + ( ModInt lhs, const int& rhs ) {
        lhs += rhs;
        return lhs;
    }

    friend ModInt operator + ( ModInt lhs, const long long& rhs ) {
        lhs += rhs;
        return lhs;
    }

    friend ModInt operator + ( ModInt lhs, const ModInt& rhs ) {
        lhs += rhs;
        return lhs;
    }

    ModInt& operator -= ( int _val ) {
        _val %= mod;
        val -= _val;
        while( val < 0 ) val += mod;
        if( val >= mod ) val -= mod;
        return *this;
    }

    ModInt& operator -= ( long long _val ) {
        _val %= mod;
        val -= _val;
        while( val < 0 ) val += mod;
        if( val >= mod ) val -= mod;
        return *this;
    }

    ModInt& operator -= ( const ModInt& other ) {
        int _val = other.val % mod;
        val -= _val;
        while( val < 0 ) val += mod;
        if( val >= mod ) val -= mod;
        return *this;
    }

    friend ModInt operator - ( ModInt lhs, const int& rhs ) {
        lhs -= rhs;
        return lhs;
    }

    friend ModInt operator - ( ModInt lhs, const long long& rhs ) {
        lhs -= rhs;
        return lhs;
    }

    friend ModInt operator - ( ModInt lhs, const ModInt& rhs ) {
        lhs -= rhs;
        return lhs;
    }

    ModInt& operator *= ( int _val ) {
        _val %= mod;
        val =  ((long long)val * val ) % mod;
        return *this;
    }

    ModInt& operator *= ( const ModInt& other ) {
        int _val = other.val % mod;
        val =  ((long long)val * val ) % mod;
        return *this;
    }

    friend ModInt operator * ( ModInt lhs, const int& rhs ) {
        lhs *= rhs;
        return lhs;
    }

    friend ModInt operator * ( ModInt lhs, const ModInt& rhs ) {
        lhs *= rhs;
        return lhs;
    }

    friend istream& operator >> ( istream& in, ModInt& inp ) {
        return in >> inp.val;
    }

    friend ostream& operator << ( ostream& out, const ModInt& pr ) {
        return out << pr.val;
    }

};

ModInt dp[1005], ans;
int n, ar[1005];

int main() {
    #ifdef CLown1331
        freopen( "in.txt","r", stdin );
    #endif /// CLown1331
    while( cin >> n ) {
        for( int i=1; i<=n; i++ ) cin >> ar[i];
        for( int i=1; i<=n; i++ ) {
            dp[i] = 1;
            for( int j=ar[i]; j<i; j++ ) {
                dp[i] += dp[j] + 1;
            }
        }
        ans = 0;
        for( int i=1; i<=n; i++ ) ans += dp[i] + 1;
        cout << ans << "\n";
    }
    return 0;
}


/**
    Was it fate that made you lower your head, or was it yourself ?

    স্বপ্ন দেখার খোলা চোখে
    হয়না সাহস আর মনে
    করি না কিছু পাওয়ার আশা

    ব্যর্থ আমার প্রার্থনারা
    আজ আমি, সব হারানো,
    আমি শূন্যতায় ভেসে, হাহাকার দেখি
    লাগে ভয়, যেন আমার,
    দেখা হলনা আলো, সুধায় অন্ধকার ...
    কেউ বোঝেনি আমায়, চেনেনি তো কেউ,
    দেখেও কতবার তবু দেখেনি কেউ
    মোর সত্য কল্পনা যতো বাস্তবতা মিথ্যে ততো
    তাই আমি, বৃষ্টি এলেই,
    পাহাড়ের চূড়ায় বসে বর্ষায় ভিজি
    ভাঙ্গলে মেঘ, পারি যেতেও আকাশ,
    শুকাতে রোদের তীরে নিজেকে আমি
    ফেরা হলো না ঘরে, নাহি ফিরলো ঘর দিকে আমার
    এসে পথেরি মাঝে, পেছনে তাকিয়ে ফিরে আবার ...
    হেটে যাই, আমি খুজতে কিছু
    আমি আজও জানিনা, কিসেরি পিছু ...
    সাথী রয়, কস্ট আমার,
    সে নেয় না তো বিদায়, দেয় নাতো বিদায়...
    নেয় নাতো বিদায়...

    আমি মিথ্যে বলেছি
    কতো মিথ্যে বলেছি নিজেকে
    এক রূপকথার মত
    বদলে যাবে এই জীবন শেষে ...
    আজ আমি, ছন্নছাড়া,
    আমি এক দিশেহারা লুকিয়ে মরি
    জানবে না, এই নেশার মায়া,
    কত যে বড় বোঝা, কত যে বোঝা ...
    নেশার মায়া, কত যে বোঝা,
    নেশার মায়া, কত যে বোঝা...
    নেশার মায়া, কত যে বোঝা...
    নেশার মায়া...

**/
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int sz = 5e5 + 10;

struct ModInt {
    int val;
    int mod = 1e9 + 7;

    ModInt() { val = 0; }
    ModInt( int _val ) { val = _val % mod; }
    ModInt( long long _val ) { val = _val % mod; }

    ModInt& operator = ( int _val ) {
        val = _val % mod;
        return *this;
    }
    ModInt& operator = ( long long _val ) {
        val = _val % mod;
        return *this;
    }
    ModInt& operator = ( const ModInt& other ) {
        val = other.val % mod;
        return *this;
    }

    ModInt& operator += ( int _val ) {
        _val %= mod;
        val += _val;
        if( val >= mod ) val -= mod;
        return *this;
    }

    ModInt& operator += ( const ModInt& other ) {
        int _val = other.val % mod;
        val += _val;
        if( val >= mod ) val -= mod;
        return *this;
    }

    friend ModInt operator + ( ModInt lhs, const int& rhs ) {
        lhs += rhs;
        return lhs;
    }

    friend ModInt operator + ( ModInt lhs, const ModInt& rhs ) {
        lhs += rhs;
        return lhs;
    }

    ModInt& operator -= ( int _val ) {
        _val %= mod;
        val -= _val;
        while( val < 0 ) val += mod;
        if( val >= mod ) val -= mod;
        return *this;
    }

    ModInt& operator -= ( const ModInt& other ) {
        int _val = other.val % mod;
        val -= _val;
        while( val < 0 ) val += mod;
        if( val >= mod ) val -= mod;
        return *this;
    }

    friend ModInt operator - ( ModInt lhs, const int& rhs ) {
        lhs -= rhs;
        return lhs;
    }

    friend ModInt operator - ( ModInt lhs, const ModInt& rhs ) {
        lhs -= rhs;
        return lhs;
    }

    friend ostream& operator << ( ostream& out, const ModInt& pr ) {
        return out << pr.val;
    }

};

ModInt dp[1005], ans;
int n, ar[1005];

int main() {
    #ifdef CLown1331
        freopen( "in.txt","r", stdin );
    #endif /// CLown1331
    while( cin >> n ) {
        for( int i=1; i<=n; i++ ) cin >> ar[i];
        for( int i=1; i<=n; i++ ) {
            dp[i] = 1;
            for( int j=ar[i]; j<i; j++ ) {
                dp[i] += dp[j] + 1;
            }
        }
        ans = 0;
        for( int i=1; i<=n; i++ ) ans += dp[i] + 1;
        cout << ans << "\n";
    }
    return 0;
}