#include <bits/stdc++.h> using namespace std; vector<int> add(vector<int> A, vector<int> B, int jin){ vector<int> C; int t=jin; for (int i=0; i<A.size() || i<B.size(); i++){ if (i < A.size()){ t += A[i]; } if (i < B.size()){ t += B[i]; } C.push_back(t%10); t = t/10; } if (t == 1) C.push_back(t); return C; } int main(){ string a, b; vector<int> A1, A2; vector<int> B1, B2; while(cin >> a >> b){ // 算有几位小数位 bool flag = false; int count_a = 0; int dot_a; for (int i=0; i<a.size(); i++){ if (flag == true){ count_a ++; } if (a[i] == '.'){ dot_a = i; flag = true; } } int count_b = 0; int dot_b; flag = false; for (int i=0; i<b.size(); i++){ if (flag == true){ count_b ++; } if (b[i] == '.') { flag = true; dot_b = i; } } if (count_a < count_b){ swap(a, b); swap(dot_a, dot_b); swap(count_a, count_b); } int add_zero = count_a - count_b; while(add_zero){ b.push_back('0'); add_zero--; } // cout << a << endl; // cout << b << endl; vector<int> A1, A2; vector<int> B1, B2; for (int i=dot_a-1; i>=0; i--){ A1.push_back(a[i] - '0'); } for (int i=dot_b-1; i>=0; i--){ B1.push_back(b[i] - '0'); } for (int i=a.size()-1; i>dot_a; i--){ A2.push_back(a[i] - '0'); } for (int i=b.size()-1; i>dot_b; i--){ B2.push_back(b[i] - '0'); } vector<int> C2 = add(A2, B2, 0); vector<int> C1; if (C2.size() > A2.size()){ C1 = add(A1, B1, 1); C2.pop_back(); } else{ C1 = add(A1, B1, 0); } for (int i=C1.size()-1; i>=0; i--) cout << C1[i]; cout << "."; for (int i=C2.size()-1; i>=0; i--) cout << C2[i]; puts(""); } return 0; }