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

//Commands and Functions
#define LCM(a,b)                (a / __gcd(a,b) ) *b
#define GCD(a,b)                __gcd(a,b)
#define dist(x1,y1,x2,y2)       sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1))
#define distl(x1,y1,x2,y2)      sqrtl((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1))
#define SQR(a)                  ((a)*(a))
#define getarray(a,n)           for(long long i=0;i<n;i++) cin>>a[i]
#define tcase                   cout<<"Case "<<C++<<": ";
#define lastEle(v)              v[v.size()-1]
#define min3(a,b,c)             min(a,min(b,c))
#define min4(a,b,c,d)           min(a,min(b,min(c,d)))
#define max3(a,b,c)             max(a,max(b,c))
#define max4(a,b,c,d)           max(a,max(b,max(c,d)))
#define max5(a,b,c,d,e)         max(max3(a,b,c),max(d,e))
#define min5(a,b,c,d,e)         min(min3(a,b,c),min(d,e))
#define MEM(a,x)                memset(a,x,sizeof(a))
#define Myspeed                 ios_base::sync_with_stdio(0);cin.tie(NULL)
#define FOR(i,b)                for(i=0;i<b;i++)
#define SORT(v)                 sort(v.begin(),v.end())
#define revsort(a,n)            sort(a,a+n); reverse(a,a+n)
#define REV(v)                  reverse(v.begin(),v.end())
#define binaryleadingzeroes(x)     __builtin_clz(x)
#define binarytrailingzeroes(x)    __builtin_ctz(x)
#define binarytotalones(x)         __builtin_popcount(x)
#define ll                      long long


long long isprime(long long n)       //If Prime,then return 1,else return 0
{
    bool flag = true;
    for(long long i = 2; i*i <= n; ++i)
        //for(long long i = 2; i <= sqrt(n); ++i)
        //for(long long i = 2; i <= n/2; ++i)
    {
        if(n%i == 0)
        {
            flag = false;
            break;
        }
    }
    return flag;
}

long long binaryPow(long long a, long long b)    // a is the base,b is the power here
{
    long long ans = 1;
    while(b > 0)
    {
        if(b & 1)
        {
            ans = ans * a ;
        }
        a = a * a ;
        b >>= 1;
    }
    return ans;
}

long long totalDigits(long long n)           //How many digits are there from 1 to n. Such as if n==13,return 17
{
long long number_of_digits = 0;

	for (long long i = 1; i <= n; i *= 10)
		number_of_digits += (n - i + 1);

	return number_of_digits;
}

long long DigitInANumber(long long n)                  //Digit in a Number. if n==567, count=3
{ long long count=0;
     while (n != 0) {
        n /= 10;     // n = n/10
        ++count;
    }

    return count;
}


bool isPalindrome(string str)                            //if palindrome then 1,else 0
{for(int i = 0; i <= str.length()-1; i++){
        if(str[i] != str[str.length()-1-i]){
            return false;
        }else {
            return true;
        }
    }
}

long long factorial(long long n)
{
    // single line to find factorial
    return (n==1 || n==0) ? 1: n * factorial(n - 1);   char str[] = "forgeeksskeegfor";
}


long long fibonacci(long long n)                  //   n th Fibonacci only
{
    if (n <= 1)
        return n;
    return fibonacci(n-1) + fibonacci(n-2);
}

int max_xor(int arr[], int n)                    //Maximum XOR From an array
{

    int maxXor = 0;

    for (int i = 0; i < n; i++) {
        for (int j = i + 1; j < n; j++) {
            maxXor = max(maxXor,
                         arr[i] ^ arr[j]);
        }
    }
    return maxXor;
}

int maximumXOR(int n, int l, int r)                 //Maximum XOR From a Range
{
    int x = 0;
    for (int i = log2(r); i >= 0; --i) {
        if (n & (1 << i)) { // Set bit
            if ((x > r) || (x + (1 << i) - 1 < l))
                x ^= (1 << i);
        }
        else { // Unset bit
            if ((x ^ (1 << i)) <= r)
                x ^= (1 << i);
        }
    }
    return n ^ x;
}

int main()

{
    ll a,b,c;

    cin>>a>>b; if(a==1) cout<<1<<endl;

   else { c=a-b;

    cout<<c+1<<endl;}
}


Measured memory_bytes: 256