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

//template
#define rep(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define ALL(v) (v).begin(),(v).end()
typedef long long int ll;
const int inf = 0x3fffffff; const ll INF = 0x1fffffffffffffff; const double eps=1e-12;
template<typename T>inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<typename T>inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
//end

template<typename T>struct FFT{
   struct C{
      T x,y;
      C(T _x=0,T _y=0):x(_x),y(_y){}
      C operator~()const{return {x,-y};}
      C operator+(const C& c)const{return {x+c.x,y+c.y};}
      C operator-(const C& c)const{return {x-c.x,y-c.y};}
      C operator*(const C& c)const{return {x*c.x-y*c.y,x*c.y+y*c.x};}
   };
   vector<C> rt;
   FFT(int lg=20){
      rt.resize(1<<lg,1);
      rep(k,1,lg){
         int d=1<<k;
         rep(i,0,d){
            if(i&1)rt[d+i]=C(cos(2*M_PI*i/d),sin(2*M_PI*i/d));
            else rt[d+i]=rt[(d+i)>>1];
         }
      }
   }
   void fft(vector<C>& a,bool inv=0){
      int n=a.size(); assert((n&(n-1))==0);
      if(inv){
         for(int i=1;i<n;i<<=1)for(int j=0;j<n;j+=i*2)for(int k=0;k<i;k++){
            a[i+j+k]=a[i+j+k]*~rt[i*2+k]; C tmp=a[j+k]-a[i+j+k];
            a[j+k]=a[j+k]+a[i+j+k]; a[i+j+k]=tmp;
         } rep(i,0,n)a[i].x/=n,a[i].y/=n;
      }
      else{
         for(int i=n>>1;i;i>>=1)for(int j=0;j<n;j+=i*2)for(int k=0;k<i;k++){
            C tmp=a[j+k]-a[i+j+k];
            a[j+k]=a[j+k]+a[i+j+k]; a[i+j+k]=tmp*rt[i*2+k];
         }
      }
      for(int i=0,j=1;j<n-1;j++){
         for(int k=n>>1;k>(i^=k);k>>=1);
         if(j<i)swap(a[i],a[j]);
      }
   }
   vector<ll> conv(vector<ll> a,vector<ll> b){
      int n=a.size()+b.size()-1,m=1; vector<ll> res(n); while(m<n)m<<=1;
      vector<C> c(m); rep(i,0,a.size())c[i].x=a[i]; rep(i,0,b.size())c[i].y=b[i];
      fft(c); C rad(0,-0.25/m);
      for(int i=0,j=0;i<=m/2;i++,j=(m-i)&(m-1)){
         C z=(c[j]*c[j]-~(c[i]*c[i]))*rad;
         if(i!=j)c[j]=(c[i]*c[i]-~(c[j]*c[j]))*rad;
         c[i]=z;
      } fft(c); rep(i,0,n)res[i]=c[i].x+0.5; return res;
   }
};

template<int D=4>struct bigint{
   int B,sign; vector<int> v;
   bigint(ll x=0){
      B=1; rep(_,0,D)B*=10; sign=1;
      if(x<0)x*=-1,sign=0;
      do{v.push_back(x%B); x/=B;
      }while(x);
   }
   bigint(string s){
      B=1; rep(_,0,D)B*=10; sign=1;
      if(s[0]=='-')s.erase(s.begin()),sign=0;
      int add=0,cnt=0,base=1;
      while(s.size()){
         if(cnt==D){
            v.push_back(add);
            cnt=0; add=0; base=1;
         }
         add=(s.back()-'0')*base+add;
         cnt++; base*=10;
         s.pop_back();
      }
      if(add)v.push_back(add);
   }
   bigint operator-()const{
      bigint res=*this;
      res.sign^=1; return res;
   }
   bigint abs()const{
      bigint res=*this;
      res.sign=1; return res;
   }
   int& operator[](const int i){return v[i];}
   int size()const{return v.size();}
   void norm(){
      rep(i,0,v.size()-1){
         if(v[i]>=0){v[i+1]+=v[i]/B; v[i]%=B;}
         else{
            int c=(-v[i]+B-1)/B;
            v[i]+=c*B; v[i+1]-=c;
         }
      }
      if(!v.empty() and v.back()>=B){
         int c=v.back()/B;
         v.back()%=B; v.push_back(c);
      }
      while(v.size()>1 and v.back()==0)v.pop_back();
   }
   friend istream& operator>>(istream& is,bigint<D>& x){
      string tmp; is>>tmp;
      x=bigint(tmp); return is;
   }
   friend ostream& operator<<(ostream& os,bigint<D> x){
      if(x.v.empty() or ((int)x.size()==1 and x[0]==0))os<<"0";
      else{
         if(!x.sign)os<<"-";
         string res=to_string(x.v.back());
         for(int i=x.size()-2;i>=0;i--){
            string add; int w=x[i];
            rep(_,0,D){
               add+=('0'+(w%10)); w/=10;
            } reverse(ALL(add)); res+=add;
         } os<<res;
      }
      return os;
   }
   bigint& operator+=(const bigint& x){
      if(sign!=x.sign){*this-=(-x); return *this;}
      if((int)v.size()<(int)x.size())v.resize(x.size(),0);
      rep(i,0,x.size())v[i]+=x.v[i];
      norm(); return *this;
   }
   bigint& operator-=(const bigint& x){
      if(sign!=x.sign){*this+=(-x); return *this;}
      if(abs()<x.abs()){*this=x-(*this); sign^=1; return *this;}
      rep(i,0,x.size())v[i]-=x.v[i];
      norm(); return *this;
   } /*
   bigint& operator*=(const bigint& x){
      
   }
   bigint& operator/=(const bigint& x){
      
   } */
   bigint operator+(const bigint& x)const{return bigint(*this)+=x;}
   bigint operator-(const bigint& x)const{return bigint(*this)-=x;}
   bigint operator*(const bigint& x)const{return bigint(*this)*=x;}
   bigint operator/(const bigint& x)const{return bigint(*this)/=x;}
   bool operator<(const bigint& x)const{
      if(sign!=x.sign)return sign<x.sign;
      if((int)v.size()!=(int)x.size())return (int)v.size()*sign<(int)x.size()*x.sign;
      for(int i=v.size()-1;i>=0;i--)if(v[i]!=x.v[i])return v[i]*sign<x.v[i]*x.sign;
      return false;
   }
   bool operator>(const bigint& x)const{return x<*this;}
   bool operator<=(const bigint& x)const{return !(x>*this);}
   bool operator>=(const bigint& x)const{return !(x<*this);}
};
typedef bigint<4> Bigint;

int main(){
   Bigint x,y;
   cin>>x>>y;
   cout<<x+y<<endl;
   return 0;
}


Measured memory_bytes: 3608