Problem:
 Score : 100 points    Problem Statement There is an N -car train.  You are given an integer i . Find the value of j such that the following statement is true: "the i -th car from the front of the train is the j -th car from the back."      Constraints  1 \leq N \leq 100  1 \leq i \leq N         Input Input is given from Standard Input in the following format:  N  i       Output Print the answer.        Sample Input 1 4 2      Sample Output 1 3  The second car from the front of a 4 -car train is the third car from the back.       Sample Input 2 1 1      Sample Output 2 1       Sample Input 3 15 11      Sample Output 3 5

Solution (Python):
N, i = map(int, input().split())

print(N-i +1)

Solution (Python):
import numpy as np
N, i = [int(j) for j in input().split()]

print(N-i+1)

Solution (Python):
n,i=map(int,input().split())
print(n-i+1)

Solution (Python):
n, a = map (int, input().split())

print(n - a +1)

Solution (Python):
n, i = map(int,input().split())
print(n-i+1)

Solution (Python):
a,b=map(int,input().split())
print(a-b+1)

Solution (Python):
data = list(map(int,input().split()))
print(data[0]-data[1]+1)

Solution (Python):
n, k = [ int(v) for v in input().split() ]

print(n+1-k)

Solution (Python):
n,i=map(int,input().split())

print(n-i+1)

Solution (Python):
N,i = map(int,input().split())
print((N -i) + 1)

Solution (Python):
N, i = map(int, input().split())
print(N - i + 1)

Solution (Python):
n,i = [int(i) for i in input().split()]
print(n - i + 1)

Solution (Python):
a, b = map(int, input().split())
print(a - b + 1)

Solution (Python):
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    n, i = f()
    print(n-i+1)

solve()

Solution (Python):
N,i = list(map(int,input().split()))
print(N-i+1)

Solution (Python):
n, i = map(int, input().split())
print(n-i+1)

Solution (Python):
N, i = map(int, raw_input().split())
print N+1-i

Solution (Python):
n,i = map(int,input().split())
print(n - i + 1)

Solution (Python):

import sys


def solve(N: int, i: int):
    print(N-i+1)



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    i = int(next(tokens))  
    solve(N, i)

if __name__ == '__main__':
    main()

Solution (Python):
N, i = map(int, input().split())

print(N - i + 1)

Solution (Python):
N, i = map(int, input().split())
print(N-i+1)

Solution (Python):
n,i=map(int,input().split())
print(n-i+1)

Solution (Python):
n, i = map(int, input().split())
print(n-i+1)

Solution (Python):
n, i = map(int, input().split())

print(n-i+1)

Solution (Python):
from sys import stdin
 
N, i = [int(x) for x in stdin.readline().rstrip().split()]
 
print(N + 1 - i)

Solution (Python):
n, i = map(int, input().split())
print(n - i + 1)

Solution (Python):
a,b=map(int,input().split())
print(a-b+1)

Solution (Python):
n,i = map(int,input().split(" "))
print(n-(i-1))

Solution (Python):
N, i = map(int, input().split())
print(N-i+1)

Solution (Python):
n, i = map(int, input().split())
print(n-i+1)

Solution (Python):
N,i = map(int, input().split())
print(int(N - i + 1))

Solution (Python):
N, i = map(int, input().split())
print(N+1-i)

Solution (Python):
N,i = map(int,input().split())
print(N-i+1)

Solution (Python):
N, i = map(int, input().split())
print((N - i) + 1)

Solution (Python):
n, i = map(int,input().split())

print(n-i+1)

Solution (Python):
a, b = input().split()
a, b = int(a), int(b)
print(a+1-b)

Solution (Python):
n,i = map(int,input().split())
print(n-i+1)

Solution (Python):
a, b = map(int, input().split())
print(a-b+1)

Solution (Python):

"""
A - Train
https://atcoder.jp/contests/abc107/tasks/abc107_a

"""
import sys


def solve(N, i):
    return N - i + 1


def main(args):
    N, i = map(int, input().split())
    ans = solve(N, i)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Solution (Python):
n,i = map(int,input().split())
print(n-i+1)

Solution (Python):
a, b = map(int, input().split())

print(a-b+1)

Solution (Python):
N, i = map(int, input().split())

print(N-i + 1)

Solution (Python):
n,i=map(int,input().split())
print(n-i+1)

Solution (Python):
a,b=map(int,input().split())
print(a-b+1)

Solution (Python):
n, i = map(int,input().split())
print(n-i+1)

Solution (Python):

l = list(map(int, input().split()))

print(l[0] - l[1] + 1)

Solution (Python):
a,b = map(int,input().split())
print(a-b+1)

Solution (Python):
N, i = map(int, input().split())

print(N + 1 - i)

Solution (Python):
first=input()
(N, i)=first.split()
N=int(N)
i=int(i)
answer=N-(i-1)
print(answer)

Solution (Python):
N,i = map(int,input().split())
ans = N-i+1
print(ans)

Solution (Python):
N,i = map(int,input().split())
ans = N - i + 1
print(ans)

Solution (Python):
N,i = map(int,input().split())
ans = N - i + 1
print(ans)

Solution (Python):
N,i = map(int,input().split())
ans = N - i + 1
print(ans)

Solution (Python):
n,i =map(int,input().split())
ans=0
ans=n-i+1
print(ans)

Solution (Python):
import sys


def input():
    return sys.stdin.readline()[:-1]








a,b=map(int,input().split())
print(a-b+1)

Solution (Python):
a, b = [int(i) for i in input().split()]
print(a - b + 1)

Solution (Python):
a, b = map(int, input().split())
print(a-b+1)

Solution (Python):
n,i = map(int,input().split(" "))
print(n+1-i)

Solution (Python):
n, i = map(int, input().split())
print( n - i + 1)

Solution (Python):
n,i = map(int,input().split())
print(n-i+1)

Solution (Python):
N, i = (raw_input()).split()
N = int(N)
i = int(i)

print (N-i+1)

Solution (Python):
n, i = map(int, input().split())
print(n-i+1)

Solution (Python):
n,i=map(int,input().split())
print(n-i+1)

Solution (Python):
N, i = map(int, input().split())

print(N - i + 1)

Solution (Python):
N,i=map(int,input().split())
print(N-i+1)

Solution (Python):
b, c = map(int, input().split())

print(b-c+1)

Solution (Python):
N,i = map(int,input().split())
print(N-i+1)

Solution (Python):
N, i = map(int, input().split())

print (N-i+1)

Solution (Python):
N, i = map(int, input().split())
print(N-i+1)

Solution (Python):
n,i = map(int, input().split())
print(n-i+1)

Solution (Python):
n,i = map(int,input().split())
print(n-i+1)

Solution (Python):


from sys import stdout
from bisect import bisect_left as binl
from copy import copy, deepcopy


mod = 1


def intin():
    input_tuple = input().split()
    if len(input_tuple) <= 1:
        return int(input_tuple[0])
    return tuple(map(int, input_tuple))


def intina():
    return [int(i) for i in input().split()]


def intinl(count):
    return [intin() for _ in range(count)]


def modadd(x, y):
    global mod
    return (x + y) % mod


def modmlt(x, y):
    global mod
    return (x * y) % mod


def lcm(x, y):
    while y != 0:
        z = x % y
        x = y
        y = z
    return x


def combination(x, y):
    assert(x >= y)

    if y > x // 2:
        y = x - y

    ret = 1

    for i in range(0, y):
        j = x - i
        i = i + 1

        ret = ret * j
        ret = ret // i

    return ret


def get_divisors(x):
    retlist = []
    for i in range(1, int(x**0.5) + 3):
        if x % i == 0:
            retlist.append(i)
            retlist.append(x // i)
    return retlist


def get_factors(x):
    retlist = []
    for i in range(2, int(x**0.5) + 3):
        while x % i == 0:
            retlist.append(i)
            x = x // i
    retlist.append(x)
    return retlist


def make_linklist(xylist):
    linklist = {}
    for a, b in xylist:
        linklist.setdefault(a, [])
        linklist.setdefault(b, [])
        linklist[a].append(b)
        linklist[b].append(a)
    return linklist


def calc_longest_distance(linklist, v=1):
    distance_list = {}
    distance_count = 0
    distance = 0
    vlist_previous = []
    vlist = [v]
    nodecount = len(linklist)

    while distance_count < nodecount:
        vlist_next = []
        for v in vlist:
            distance_list[v] = distance
            distance_count += 1
            vlist_next.extend(linklist[v])
        distance += 1
        vlist_to_del = vlist_previous
        vlist_previous = vlist
        vlist = list(set(vlist_next) - set(vlist_to_del))

    max_distance = -1
    max_v = None
    for v, distance in distance_list.items():
        if distance > max_distance:
            max_distance = distance
            max_v = v

    return (max_distance, max_v)


def calc_tree_diameter(linklist, v=1):
    _, u = calc_longest_distance(linklist, v)
    distance, _ = calc_longest_distance(linklist, u)
    return distance





def main():
    n, i = intin()

    print(n - i + 1)


if __name__ == '__main__':
    main()

Solution (Python):
N,i = map(int, input().split())
print(N-i+1)

Solution (Python):
n,i = map(int,input().split())
print(n-i+1)

Solution (Python):
N,i=map(int,input().split())
print(N-i+1)

Solution (Python):
N, i = map(int, input().split())

print(N-i+1)

Solution (Python):
a, b = map(int, input().split())
print(a-b+1)

Solution (Python):
x,y = map(int,input().split())
print(x - y + 1)

Solution (Python):
n, i = map(int, input().split())
print((n+1) - i)

Solution (Python):
N,I=[int(a) for a in input().split(" ")]
print(N-I+1)

Solution (Python):
N,i=map(int,input().split())
print(N-i+1)

Solution (Python):
n,i=map(int,input().split())
print(n-i+1)

Solution (Python):
a,b=map(int,input().split());print(a-b+1)

Solution (Python):
n,i=map(int,input().split())
print(n+1-i)

Solution (Python):
n,i = map(int,input().split())
print(n-i+1)

Solution (Python):
n, i = map(int,input().split())
print(n-i+1)

Solution (Python):
n, i = map(int, input().split())
print(n-i+1)

Solution (Python):
n,i=map(int,input().split())
print(n-i+1)

Solution (Python):
a, b = map(int,input().split())
print(a-b+1)

Solution (Python):
n, i = map(int, input().split())
print(n - i + 1)

Solution (Python):
N, i = map(int, input().split())

print(N - i + 1)

Solution (Python):
N,i = list(map(int,input().split()))
print(N + 1 - i)

Solution (Python):
n, i = map(int,input().split())
print(n-i+1)

Solution (Python):
n,i = map(int,input().split())

print(n - i + 1)

Solution (Python):
n,i=map(int,input().split())
print(n-i+1)

Solution (Python):
N, i = map(int, input().split())
print(N-i+1)

Solution (Python):
n,i=map(int,input().split())
print(n-i+1)

Solution (Python):
n, i = [int(i) for i in input().split()]
print(n-i+1)

Solution (Python):
n,i=map(int,input().split())
print(n-i+1)

Solution (Python):
N,i=map(int,input().split())
print(N-i+1)

Solution (Python):
n, i = map(int, input().split())
ans = n+1 - i
print(ans)

Solution (Python):
nums = [int(i) for i in input().split()]

print(nums[0] - nums[1] + 1)

Solution (Python):
N,i = map(int,input().split())
print(N-i+1)

Solution (Python):
N,i = list(map(int,input().split()))
ans = N - i + 1
print(ans)

Solution (Python):
N,i=map(int,input().split())
print(N-i+1)

Solution (Python):
a,b = map(int,input().split())
if a == 1:
    print(1)
else:
    print(a-b+1)

Solution (Python):
a,b=map(int, input().split())

print(int(a-b+1))

Solution (Python):
N,i = map(int, input().strip().split(' '))
print(N-i+1)

Solution (Python):
a,b=map(int,input().split())
print(a+1-b)

Solution (Python):
N, i = map(int, input().split())
ans = 0
if N == 1:
    ans = 1
else:
    ans = N - i + 1
print(ans)

Solution (Python):

import sys
from math import *
from itertools import *
from collections import *
from functools import *
try:
    from math import gcd
except Exception:
    from fractions import gcd


def solve(N: int, i: int):
    return N - (i - 1)


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    i = int(next(tokens))  
    result = solve(N, i)
    print(result)

if __name__ == '__main__':
    main()

Solution (Python):
N, i = map(int,input().split())
b=N+1-i
print(b)

Solution (Python):
import sys
input = sys.stdin.readline

n, i = map(int, input().split())

print(n-i+1)

Solution (Python):
N,i = map(int,input().split())
print(N-i+1)

Solution (Python):
N,i = list(map(int,input().split()))
print(N-i+1)

Solution (Python):
a,b = list(map(int,input().split()))
print(a-b+1)

Solution (Python):
n,i = map(int,input().split())
print(n-i+1)

Solution (Python):
n, i = map(int, input().split())
print(n-i+1)

Solution (Python):
n, i = map(int, input().split(' '))
print(n-i+1)

Solution (Python):
N,i = map(int, input().split())
print(N-i+1)

Solution (Python):
n,i = map(int,input().split())
print(n - i + 1)

Solution (Python):
[N,i] = list(map(int,input().split()))
print(N-i+1)

Solution (Python):
N, i = map(int, input().split())
print(N-i+1)

Solution (Python):
a,b=list(map(int,input().split()))
print(a-b+1)

Solution (Python):
N, i = map(int, input().split())

print(N - i + 1)

Solution (Python):
a,b = map(int,input().split())
print(a-b+1)

Solution (Python):
nilist=input().split()
n=int(nilist[0])
i=int(nilist[1])
ans=n-i+1
print(ans)

Solution (Python):

import re

n = input()
n = re.split(" ",n)

N = int(n[0])
i = int(n[1])

if(N == i):
    print(1)
else:
    print(N - i + 1)

Solution (Python):
import bisect
from collections import Counter
def MI(): return map(int, input().split())
def II(): return int(input())
def IS(): return input()
def LI(): return list(map(int, input().split()))


n, i = MI()
print(n-i+1)

Solution (Python):
a,b=map(int,input().split())
print(a-b+1)

Solution (Python):

import sys
import copy
import collections
from bisect import bisect_left
	
def main():
	N, i = map(int, input().split())
	
	print(N-i+1)
	
if __name__ == "__main__":
	main()

Solution (Python):
N,i = map(int,input().split())
print(N-i+1)

Solution (Python):
A,B = map(int,input().split())
print(A-B+1)

Solution (Python):
a,b=map(int,input().split())
print(a-b+1)

Solution (Python):
N, i = map(int, input().split())

temp = N - i
print(temp + 1)

Solution (Python):

def check(i, j, k, K):
    if (i + j + 2) % K == 0 and (i + k + 2) % K == 0 and (k + j + 2) % K == 0:
        return 1
    else:
        return 0


def get_num(i, j, k):
    if i != j and i != k and j != k:
        return 6
    elif i == j == k:
        return 1
    else:
        return 3

def main():
    a, b = map(int, input().split())
    print(a - b + 1)

if __name__ == '__main__':
    main()

Solution (Python):
N, i = map(int, input().split())
N_list = list(range(1, N+1))
N_list.reverse()
for j in range(N):
    if i == N_list[j]:
        print(j+1)

Solution (Python):
N, i = map(int, input().split())
print(N + 1 - i)

Solution (Python):
a, b = map(int, input().split())
print(a-b+1)

Solution (Python):
N, i = map(int,input().split())
print(N-i+1)

Solution (Python):
N,i = map(int,input().split())
print(N-i+1)

Solution (Python):
n,i=map(int,input().split())
print(n+1-i)

Solution (Python):
import functools

import os

INF = float('inf')


def inp():
    return int(input())


def inpf():
    return float(input())


def inps():
    return input()


def inl():
    return list(map(int, input().split()))


def inlf():
    return list(map(float, input().split()))


def inls():
    return input().split()


def debug(fn):
    if not os.getenv('LOCAL'):
        return fn

    @functools.wraps(fn)
    def wrapper(*args, **kwargs):
        print('DEBUG: {}({}) -> '.format(
            fn.__name__,
            ', '.join(
                list(map(str, args)) +
                ['{}={}'.format(k, str(v)) for k, v in kwargs.items()]
            )
        ), end='')
        ret = fn(*args, **kwargs)
        print(ret)
        return ret

    return wrapper


n, i = inl()
print(n - i+ 1)

Solution (Python):
N, i = map(int, input().split())
print(N-i+1)

Solution (Python):
n, i = map(int, input().split())
print(n - i + 1)

Solution (Python):

import sys


def solve(N: int, i: int):
    ret = N - i + 1
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    i = int(next(tokens))  
    solve(N, i)

if __name__ == '__main__':
    main()

Solution (Python):
n,i = map(int,input().split())
print(n-i+1)

Solution (Python):
N, i = map(int, input().split())
print(N + 1 - i)

Solution (Python):
n,i=map(int, input().split())

print(n-i+1)

Solution (Python):

n, i = list(map(int, input().rstrip().split()))
print(n - i + 1)

Solution (Python):
n, i = map(int, input().split())
print(n-i+1)

Solution (Python):
n,i=map(int,input().split())
print(n+1-i)

Solution (Python):
n,i=map(int,input().split())
print(n-i+1)

Solution (Python):
N, i = map(int, input().split())
train = []
for j in range(1,N+1):
    train.append(j)
train.sort(reverse=True)

print(train[i-1])

Solution (Python):
n,i=map(int,input().split())
print(n+1-i)

Solution (Python):
N, i = map(int, input().split())
print(N - i + 1)

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007


def A():
    a,b,c = LI()
    print(9*max(a,b,c)+a+b+c)
    return


def B():
    a,b = LI()
    if a*b %2:
        print("Yes")
    else:
        print("No")
    return


def C():
    k = I()
    print((k//2)*(k//2+k%2))
    return


def D():
    n,i = LI()
    print(n-i+1)
    return


def E():
    return


def F():
    return


def G():
    return


def H():
    return


def I_():
    return


def J():
    return


if __name__ == "__main__":
    D()

Solution (Python):
input = input().split()
N = int(input[0])
i = int(input[1])


if N-i == 0:
    print(1)
else:
    print(N-i+1)

Solution (Python):
N,i=map(int,input().split())
print(N-i+1)

Solution (Python):
a,b = map(int, input().split())
print(a + 1 - b )

Solution (Python):
n, i = map(int, input().split())
print(n-i+1)

Solution (Python):
a,b=map(int,input().split())
print(a-b+1)

Solution (Python):
N,i = map(int, input().split())
print(N-i+1)

Solution (Python):
N,i=map(int, input().split())
print(N-i+1)

Solution (Python):
n,i =map(int,input().split())
print(n-i+1)

Solution (Python):


a, b = map(int, input().split())

print(a - b + 1)

Solution (Python):
i,j=map(int, input().split())
print(i-j+1)

Solution (Python):
N,i = map(int,input().split())
n = N - i + 1
print(n)

Solution (Python):
n,i=map(int,input().split())
print(1+n-i)

Solution (Python):
n,i=map(int,input().split())
print(n-i+1)

Solution (Python):
n, i = map(int, input().split())

print(n-i+1)

Solution (Python):

N,i= map(int,input().split())
print(N-i+1)

Solution (Python):
N,i = map(int, input().split())
print(N-i+1)

Solution (Python):
N,i = map(int,input().split())
print(int(N-i+1))

Solution (Python):
N, i = map(int, input().split())

print(N + 1 - i)

Solution (Python):
a,b = map(int,input().split())
print(a-b+1)

Solution (Python):
n,i = map(int,input().split())
ans = n - i + 1
print(ans)

Solution (Python):
N, i = map(int, input().split())
print(int(N-i+1))

Solution (Python):
N, i = map(int, input().split())
print(int(N-i+1))

Solution (Python):
a,b=map(int,input().split())
print(a-b+1)

Solution (Python):
n,i = map(int,input().split())
print(n-i+1)

Solution (Python):
n, i = map(int, input().split())
print(n - i + 1)

Solution (Python):
def main():
	N, i = map(int, input().split())
	print(N-i+1)


if __name__ == '__main__':
    main()

Solution (Python):
n,i=map(int, input().split())
print(n-i+1)

Solution (Python):
N, i = map(int, input().split())
print(N-i+1)

Solution (Python):
a = list(map(int, input().split(" ")))
print(a[0] - a[1] + 1)

Solution (Python):
a = list(map(int, input().split(" ")))
print(a[0] - a[1] + 1)

Solution (Python):
a, b = map(int, input().split())
print(a-b+1)

Solution (Python):
a, b=map(int, input().split())
print(a-b+1)

Solution (Python):
N, I = map(int, input().split())
print(N - I + 1)

Solution (Python):
N,i = map(int, input().split())
print(N-i+1)

Solution (Python):
import numpy as np

class Calculator:
    def __init__(self):
        self.num = 0

    def set_num(self, N, i):
        self.N = N
        self.i = i

    def calc(self):
        self.num = self.N - self.i + 1;

    def get_num(self):
        return self.num

def main():
    N, i, = map(int, input().split())
    c = Calculator()
    c.set_num(N, i)
    c.calc()
    ans = c.get_num()
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):
N, i = map(int, input().split())

print(N - i + 1)

Solution (Python):
a,b = [int(i) for i in input().split()]
print(a - b + 1)

Solution (Python):


def main():
    N, i = [int(x) for x in input().split()]
    print(N - i + 1)

    
        

if __name__ == '__main__':
    main()

Solution (Python):
n,k=map(int,input().split())
print(int(n+1-k))

Solution (Python):
N, i = map(int, input().split())
print(N - (i - 1))

Solution (Python):
N,i=input().split()
a=int(N)
b=int(i)
print(a+1-b)

Solution (Python):
N,i = map(int,input().split())
print(N - i + 1)

Solution (Python):
N,i=map(int,input().split())
print(N-i+1)

Solution (Python):


a, b = map(int, input().split())

print(a - b + 1)

Solution (Python):
N, i = map(int, input().split())
print(N-i+1)

Solution (Python):
a, b = map(int, input().split())
print(a - b + 1)

Solution (Python):
N, i =map(int,  input().split())
print(N - i + 1)

Solution (Python):
N, i = map(int, input().split())
print(N-i+1)

Solution (Python):
import math
import sys

X,Y=map(int,input().split())

print(X-Y+1)

Solution (Python):
n, i = map(int, input().split())
ans = n - i + 1
print(ans)

Solution (Python):
N, i = map(int, input().split())

print(N-i+1)

Solution (Python):
a, b = map(int, input().split())

print(a - b + 1)

Solution (Python):
N,i=map(int,input().split())
print(N-i+1)

Solution (Python):
N, i = map(int, input().split())
answer = N+1-i
print("{}".format(answer))

Solution (Python):
N,i = map(int, input().split())
print(N-i+1)

Solution (Python):
N, i = map(int, input().split())
print(N - i + 1)

Solution (Python):
n, i = map(int, input().split())
print(n - i + 1)

Solution (Python):
N, i = map(int,input().split())
print(N-i+1)

Solution (Python):
a,b = map(int, input().split())
print(a-b+1)

Solution (Python):
N,i = map(int, input().split())
print(N-i+1)

Solution (Python):

import sys
import itertools
import collections
from queue import Queue
import functools
import math
INF = 10**9


def solve(N: int, i: int):
    print(N-i+1)
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    i = int(next(tokens))  
    solve(N, i)


if __name__ == '__main__':
    main()

Solution (Python):
n,i = map(int,input().split())
print(n-i+1)

Solution (Python):
N, i =  map(int, input().split())

print(N - i + 1)

Solution (Python):
N,K=map(int,input().split())
print(N-K+1)

Solution (Python):
a, b = map(int, input().split())
print(a - b + 1)

Solution (Python):
N, i = map(int, input().split())
print(N - i + 1)

Solution (Python):
N, i = map(int, input().split())
print(N-i+1)

Solution (Python):
N, i = map(int, input().split())
print(N - i + 1)

Solution (Python):
n, i = map(int, input().split())
print(n - i + 1)

Solution (Python):
N,i = list(map(int,input().split()))
print(N-i+1)

Solution (Python):
n,i = map(int,input().split())
print(n+1-i)

Solution (Python):
N,i = list(map(int,input().split()))
print(N-i+1)

Solution (Python):
print(eval(input().replace(' ','-'))+1)

Solution (Python):
n,i=map(int,input().split())
print(n-i+1)

Solution (Python):
a,b=map(int,input().split())
print(a-b+1)

Solution (Python):
n, i = map(int, input().split())

print(n - i + 1)

Solution (Python):
n,i = map(int,input().split())
print(n - i + 1)

Solution (Python):
k,b=map(int,input().split(' '))
print(k-b+1)

Solution (Python):
N, i =  (int(j) for j in input().split())

print(N+1-i)

Solution (Python):
a,d=map(int,input().split())
print(a-d+1)

Solution (Python):
n,i = list(map(int,input().split()))
print(n-i+1)

Solution (Python):
N, i = map(int, input().split())

print(N + 1 - i)

Solution (Python):


n,i = map(int,input().split())

print(n-i+1)

Solution (Python):


N, i = map(int, input().split())

print(N - i + 1)

Solution (Python):
N, i = map(int, input().split())

print(N-i+1)

Solution (Python):
'''
A. train
'''

def main():
    s = [int(x) for x in input().strip().split()]
    return(s[0]-s[1]+1)

print(main())

Solution (Python):
n, i = input().split(" ")
print(int(n) - int(i) + 1)

Solution (Python):

N, i = map(int, input().split())
print(N - i + 1)

Solution (Python):
N, i = map(int, input().split())
print(N-i+1)

Solution (Python):
N,i = map(int,input().split())
print(len(range(N)[i-1:]))

Solution (Python):




n, i = map(int, input().split())


print(n+1-i)

Solution (Python):
N, i = [int(i) for i in input().split()]
print(N-i+1)

Solution (Python):
N,i = map(int,input().split())

print(N - i + 1)

Solution (Python):
N, i = map(int,input().split(' '))
print(N-i+1)

Solution (Python):
N,i = [int(x) for x in input().split()]
print(N-i+1)

Solution (Python):
n,i = map(int,input().split())
print(n-i+1)

Solution (Python):
N, i = [int(x) for x in input().split()]
print(N - i + 1)

Solution (Python):
N, i = [int(item) for item in input().split()]

print(N-i+1)

Solution (Python):
N, i = map(int, input().split())
print(N-i+1)

Solution (Python):
a,b=list(map(int,input().split()))
print(a-b+1)

Solution (Python):
n, i = map(int, input().split())

count = 0

for num in range(n, 0, -1):
    count += 1
    if num == i:
        break
print(count)

Solution (Python):
n,i=map(int,input().split())
print(n-i+1)

Solution (Python):
n, i = map(int, input().split())
print(n-i+1)

Solution (Python):
a, b = map(int, raw_input().split())
print a - b + 1

Solution (Python):
l = [int(i) for i in input().split()]
print(l[0]-l[1]+1)

Solution (Python):
a,b=map(int,input().split())
print(a-b+1)

Solution (Python):
n,i = map(int, input().split())
ans = n - i + 1
print(ans)

Solution (Python):
a,b=map(int,input().split());print(a-b+1)

Solution (Python):
A,B=map(int,input().split())
print(A-B+1)

Solution (Python):
n,i=map(int,input().split())
print(n-i+1)

Solution (Python):
ni=input().split()
N=int(ni[0]);i=int(ni[1])
print(N-i+1)

Solution (Python):
N,i=map(int,input().split())
print(N-i+1)

Solution (Python):
I = list(map(int, input().split()))
N = I[0]
i = I[1]

print(N - i + 1)

Solution (Python):
n,i=map(int,input().split())
print(n-i+1)

Solution (Python):
N, i = map(int, input().split())
print(N-i+1)

Solution (Python):
n, i = map(int, input().split())
print(n-i+1)

Solution (Python):
N, i = map(int, input().split())
print(N-i+1)

Solution (Python):
a,b = map(int, input().split())
print(a-b+1)

Solution (Python):
N, i = [int(x) for x in input().split()]
print(N+1-i)

Solution (Python):
n,i=map(int,input().split())
print(int(n-i+1))

Solution (Python):
N,i=map(int, input().split())
print(N-i+1)

Solution (Python):
N,i=map(int,input().split())
print(N-i+1)

Solution (Python):
N, i = map(int, input().split())
print(N - i + 1)

Solution (Python):
N, i = map(int, input().split())
print(N-i+1)

Solution (Python):
N,i = map(int,input().split())
print(N-i+1)

Solution (Python):
n,i = map(int, input().split())
print(n-i+1)

Solution (Python):
inp = input().split(" ")
print(int(inp[0]) - int(inp[1]) + 1)

Solution (Python):
N, i = map(int, input().split())
print(N-i+1)

Solution (Python):
n,i=map(int,input().split())
print(n+1-i)

Solution (Python):
N,i=map(int,input().split())
print(N-i+1)

Solution (Python):
n,m = map(int,input().split())

print(n-m+1)

Solution (Python):
N, i = (int(i) for i in input().split())

print(N-i+1)

Solution (Python):
N, i = map(int, input().split())

print(N - i + 1)

Solution (Python):
ri = lambda: int(input())
rl = lambda: list(map(int,input().split()))
rr = lambda N: [ri() for _ in range(N)]
YN = lambda b: print('YES') if b else print('NO')
yn = lambda b: print('Yes') if b else print('No')
OE = lambda x: print('Odd') if x%2 else print('Even')
INF = 10**18

N,i=rl()
print(N-i+1)

Solution (Python):
a,b= (int(i) for i in input().split())  
print(a-b+1)

Solution (Python):
N, i = map(int, input().split())
print(N-i+1)

Solution (Python):

A, B = map(int, input().split())
print(A - B + 1)

Solution (Python):
N, i = map(int,input().split())
print(N-i+1)

Solution (Python):
N,i=map(int,input().split())
print(N-i+1)

Solution (Python):
N,i=map(int,input().split(' '))
print(N-i+1)

Solution (Python):
a,b=map(int,input().split())
print(a-b+1)

Solution (Python):
n,i=map(int,input().split())
print(n-i+1)

Solution (Python):
N, i= (int(_) for _ in input().split()) 
print(N-i+1)

Solution (Python):
a, b = map(int, input().split())
print(a - b + 1)

Solution (Python):
N, i = map(int, input().split())

print(N-i+1)

Solution (Python):
a,b=map (int,input().split())
print(a+1-b)

Solution (Python):
a,b = map(int,input().split())
print(a-b+1)

Solution (Python):
N, i = map(int,input().split())

print(N-i+1)

Solution (Python):
N,i=map(int,input().split())
print(N-i+1)

Solution (Python):
N, i = map(int, input().split())
print(N - i + 1)

Solution (Python):
N,i=map(int,input().split())
print(N-i+1)

Solution (Python):
def train(N: int, i: int)->int:
    return N - i + 1


if __name__ == "__main__":
    N, i = map(int, input().split())
    ans = train(N, i)
    print(ans)

Solution (Python):


import sys 

n,i = map(int, sys.stdin.readline().rstrip().split())
print(n-i+1)

Solution (Python):
a,b=map(int,input().split())
print(a-b+1)

Solution (Python):
N, i = map(int, input().split())
print(N - i + 1)

Solution (Python):
a,b=map(int,input().split())
print(a-b+1)

Solution (Python):
def ans():
  N, i = map(int,input().split())
  print(N-i+1)
ans()

Solution (Python):
N, i = map(int,input().split())
print(N-i+1)

Solution (Python):
print(eval(input().replace(" ","-"))+1)

Solution (Python):
print(eval(input().replace(" ","-")+"+1"))

Solution (Python):
N, i = map(int, input().split())
print(N + 1 - i)

Solution (Python):
list1 = [int(a) for a in input().split()]
list1_0 = list1[0] 
list1_1 = list1[1] 

t = (list1_0 - list1_1) + 1
print(t)

Solution (Python):
y = [int(x) for x in input().split()]
print(y[0] - y[1] + 1)

Solution (Python):
n ,k = map(int,input().split())

print(n-k+1)

Solution (Python):
n, i = map(int, input().split())

print(n-i+1)

Solution (Python):
N, i = map(int, input().split())
print(N-i+1)

Solution (Python):
n, k=map(int, input().split())
print(n-k+1)

Solution (Python):
N,i = map(int,input().split())

print(N-i+1)

Solution (Python):
n,i=map(int,input().split())
print(n-i+1)

Solution (Python):
N, i = [ int(x) for x in input().split() ]

ans = N - i + 1

print(ans)
print()

Solution (Python):
n,i=map(int,input().split())
print(n-i+1)

Solution (Python):
N,i = map(int,input().split())

answer = N - i + 1

print(answer)

Solution (Python):
N,i = map(int,input().split())

answer = N - i + 1

print(answer)

Solution (Python):
N,i = map(int, input().split())
print(N-i+1)

Solution (Python):

n, i = [int(x) for x in input().split()]
print(n - i + 1)