#include <bits/stdc++.h>
using namespace std;
//#include <boost/multiprecision/cpp_int.hpp>
//using multiInt = boost::multiprecision::cpp_int;

using ll = long long int;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template <typename Q_type>
using smaller_queue = priority_queue<Q_type, vector<Q_type>, greater<Q_type>>;

const int MOD_TYPE = 1;
const ll MOD = (MOD_TYPE == 1 ? (ll)(1e9 + 7) : 998244353);
const int INF = (int)1e9;
const ll LINF = (ll)4e18;
const double PI = acos(-1.0);

#define REP(i, m, n) for (ll i = m; i < (ll)(n); ++i)
#define rep(i, n) REP(i, 0, n)
#define MP make_pair
#define MT make_tuple
#define YES(n) cout << ((n) ? "YES" : "NO") << endl
#define Yes(n) cout << ((n) ? "Yes" : "No") << endl
#define Possible(n) cout << ((n) ? "Possible" : "Impossible") << endl
#define possible(n) cout << ((n) ? "possible" : "impossible") << endl
#define Yay(n) cout << ((n) ? "Yay!" : ":(") << endl
#define all(v) v.begin(), v.end()
#define NP(v) next_permutation(all(v))
#define dbg(x) cerr << #x << ":" << x << endl;

vector<int> Dx = {0, 0, -1, 1, -1, 1, -1, 1, 0};
vector<int> Dy = {1, -1, 0, 0, -1, -1, 1, 1, 0};

//a<b a,bは非負
bool CompareP(string a, string b)
{
  if (a.length() != b.length())
    return a.length() < b.length();
  rep(i, a.length())
  {
    if (a[i] != b[i])
      return a[i] < b[i];
  }
  return false;
}

//a+b a,bは非負
string AddP(string a, string b)
{
  reverse(all(a));
  reverse(all(b));
  string res;
  int up = 0;
  rep(i, max(a.length(), b.length()))
  {
    int ai, bi;
    ai = i < a.length() ? (int)(a[i] - '0') : 0;
    bi = i < b.length() ? (int)(b[i] - '0') : 0;
    int t = ai + bi + up;
    if (up == 1)
      up = 0;
    if (t >= 10)
    {
      up = 1;
      t -= 10;
    }
    res.push_back((char)(t + '0'));
  }
  if (up > 0)
    res.push_back('1');

  reverse(all(res));
  return res;
}

//a-b a,bは非負
string SubstractP(string a, string b)
{
  bool minus = CompareP(a, b);
  if (minus)
    swap(a, b);

  reverse(all(a));
  reverse(all(b));
  string res;
  int down = 0;
  rep(i, a.length())
  {
    int ai, bi;
    ai = i < a.length() ? (int)(a[i] - '0') : 0;
    bi = i < b.length() ? (int)(b[i] - '0') : 0;
    int t = ai - bi - down;
    if (down == 1)
      down = 0;
    if (t < 0)
    {
      down = 1;
      t += 10;
    }
    res.push_back((char)(t + '0'));
  }
  while (*res.rbegin() == '0' && res.length() > 1)
    res.pop_back();
  if (minus)
    res.push_back('-');
  reverse(all(res));
  return res;
}

string Add(string a, string b)
{
  string res;
  if (a[0] != '-' && b[0] != '-')
    res = AddP(a, b);
  else if (a[0] == '-' && b[0] != '-')
    res = SubstractP(b, a.substr(1));
  else if (a[0] != '-' && b[0] == '-')
    res = SubstractP(a, b.substr(1));
  else
    res = "-" + AddP(a.substr(1), b.substr(1));
  return res;
}

string Substract(string a, string b)
{
  string res;
  if (b[0] != '-')
    res = Add(a, "-" + b);
  else
    res = Add(a, b.substr(1));
  return res;
}

int main()
{
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << setprecision(50) << setiosflags(ios::fixed);

  string a, b;
  cin >> a >> b;
  cout << Add(a, b) << endl;
  return 0;
}



Measured memory_bytes: 3692