#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<long long> v;
  string s1, s2;
  cin >> s1 >> s2;
  long long n1 = s1.size(), n2 = s2.size();
  long long m = min(s1.size(), s2.size());
  int c1 = 0, c2 = 0, r = 0, x, y;
  if ((n1 == 1 && s1[0] == '0') || (n2 == 1 && s2[0] == '0')) {
    if (n2 == 1 && s2[0] == '0') {
      cout << s1 << endl;
    } else {
      for (int i = n2 - 1; i >= 0; i--) {
        if (s2[i] != '0') {
          cout << s2[i];
        }
      }
      cout << endl;
    }
  } else {
    for (long long i = 0; i < m; i++) {
      x = ((s1[n1 - i - 1] - '0') + (s2[i] - '0'));
      y = x + r;
      r = y / 10;
      v.push_back(y % 10);
      c1++;
      c2++;
    }
    long long i = 0;
    while (c1 < n1) {
      x = (s1[i] - '0') + r;
      y = x % 10;
      r = x / 10;
      v.push_back(y);
      i++;
      c1++;
    }
    long long j = n2 - 1;
    while (c2 < n2) {
      x = (s2[j] - '0') + r;
      y = x % 10;
      r = x / 10;
      v.push_back(y);
      j--;
      c2++;
    }
    if (r > 0) v.push_back(r);
    for (int i = v.size() - 1; i >= 0; i--) {
      cout << v[i] << "";
    }
    cout << endl;
  }
  return 0;
}
