#include using namespace std; typedef long long LL; typedef long double LD; typedef pair < int, int > PII; typedef pair < LL, LL > PLL; #define all(x) (x).begin(), (x).end() #define sz(x) (int)(x).size() int main() { ios_base::sync_with_stdio(0); cin.tie(0); LL ans = 0; string s; while(cin >> s) { LL cnt = 0; for(auto x: s) if(x == '|') cnt++; if(cnt == 0) cnt = 1; int id = 0; LL acc = 0; if(s[0] != '|') { while(s[id] != ',') acc = 10 * acc + (s[id++] - '0'); } else acc = 42; ans += acc * cnt; } ans = ((ans + 9) / 10) * 10; cout << ans << ",-"; return 0; }