using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static string DifBig(string s, string t)
        {
            if (t[0] == '-') return AddBig(s, t.Substring(1));
            else return AddBig(s, "-" + t);
        }
        static string AddBig(string s, string t)
        {
            if (s[0] != '-' && t[0] != '-') return Plus(s, t);
            if (s[0] == '-' && t[0] == '-') return "-" + Plus(s.Substring(1), t.Substring(1));

            if (s[0] == '-') //常にtが負sが正
            {
                string temp = s;　s = t;　t = temp;           
            }
            string larger = s;
            string smaller = t.Substring(1);
            string sign = "";
            if (Cmp(s, t.Substring(1)) < 0)
            {
                larger = smaller;
                smaller = s;
                sign = "-";
            }


            return sign + Minus(larger, smaller);
        }
        //符号なし数字文字列において、数値としてsのほうがtよりなら1 同じなら0 小さいなら -1
        static int Cmp(string s, string t)
        {
            if (s == t) return 0;
            if (s.Length > t.Length) return 1;
            if (s.Length < t.Length) return -1;
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i] > t[i]) return 1;
                else if (s[i] < t[i]) return -1;
            }

            return -9999999; //エラー
        }

        static string Plus(string s, string t)
        {
            int[] array = new int[Math.Max(s.Length, t.Length) + 1];
            int i = s.Length - 1;
            int j = t.Length - 1;
            int k = 0;
            while (i >= 0 || j >= 0)
            {
                int v = 0;
                int w = 0;
                if (i >= 0) v = s[i] - '0';
                if (j >= 0) w = t[j] - '0';
                int x = v + w + array[k];
                if (x >= 10)
                {
                    array[k + 1] += 1;
                    x %= 10;
                }

                array[k] = x;
                i--;
                j--;
                k++;
            }

            string ret = String.Join("", array.Reverse());
            return ret[0] == '0' ? ret.Substring(1) : ret;
        }

        static string Minus(string larger, string smaller)
        {
            if (larger == smaller) return "0";

            int[] array = new int[larger.Length];
            int[] L = larger.Select(x => int.Parse("" + x)).ToArray();
            int i = larger.Length - 1;
            int j = smaller.Length - 1;
            int k = 0;

            while (i >= 0 || j >= 0)
            {
                int v = 0;
                int w = 0;
                if (i >= 0) v = L[i];
                if (j >= 0) w = smaller[j] - '0';
                int x = v - w;
                if (x < 0)
                {
                    x += 10;
                    int csr = i - 1;
                    while (L[csr] == 0)
                    {
                        L[csr] = 9;
                        csr--;
                    }
                    L[csr]--;
                }
                array[k] = x;
                i--;
                j--;
                k++;
            }

            string ret = String.Join("", array.Reverse().SkipWhile(x => x == 0));
            return ret;
        }

        static void Main(string[] args)
        {
            var st = Console.ReadLine().Split(' ');
            string s = st[0];
            string t = st[1];
            Console.WriteLine(DifBig(s, t));
        }
    }
}



Measured memory_bytes: 26664