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



Sample input:
4 2


Sample output:
3

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(eval(input().replace(*' -'))+1)

Submission status: Accepted

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

x = N - i + 1

print(x)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

print(n - i + 1)

Submission status: Accepted

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

print(n - i + 1)

Submission status: Accepted

Solution code:
N,i=map(int,input().split())
lst=[]
for s in range(N+1):
    lst.append(s)
a=len(lst)-i
print(a)

Submission status: Accepted

Solution code:
n, i = [int(i) for i in input().split()]

print(n-i+1)

Submission status: Accepted

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

ABC107_A()

Submission status: Accepted

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

Submission status: Accepted

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

print(n+1-i)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def imp():return map(int,input().split())
def ip():return int(input())

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

Submission status: Accepted

Solution code:
#n=int(input())
n,i=map(int,input().split())
#l=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]

print(n-i+1)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for _ in range(N)]
def dp2(ini, i, j): return [[ini]*i for _ in range(j)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

N, A = mi()
print(N-A+1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,i = (int(x) for x in input().split())
if N >= i:
  print(N + 1 - i)
else:
  pass

Submission status: Accepted

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

print(a+1-b)

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

print((N+1)- i)

Submission status: Accepted

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

Submission status: Accepted

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

ans = n - i + 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

x = N - i + 1

print(x)

Submission status: Accepted

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

print(n-i + 1)

Submission status: Accepted

Solution code:
def actual(n, i):
    return n - i + 1

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A - Train

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()


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



if __name__ == "__main__":
    main()

Submission status: Accepted

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

print(N-i+1)

Submission status: Accepted

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

print(n - i + 1)

Submission status: Accepted

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

print(n-i+1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

print(n-i+1)

Submission status: Accepted

Solution code:
n,m=map(int,input().split())
print(n-(m-1))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

# output
print(N - (i - 1))

Submission status: Accepted

Solution code:
def main():
    N, i = map(int, input().split())

    print(N - i + 1)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = n - i + 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.buffer.readline


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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right, insort_left, insort_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
from fractions import gcd
import sys
def input(): return sys.stdin.readline().rstrip()
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = 10**18
# ----------------------------------------------------------- #

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = N - i + 1
print(ans)

Submission status: Accepted

Solution code:
# coding: utf-8

# https://atcoder.jp/contests/abc107
# 13:40-


def main():
    n, i = map(int, input().split())
    return n-i+1


print(main())

Submission status: Accepted

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

print(n-m+1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
inf = 10 ** 15
mod = 10 ** 9 + 7
n,i = map(int, input().split())
print(n-i+1)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#############
# Main Code #
#############

N,i = inputIL()

print(N-i+1)

Submission status: Accepted

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

print( N - i + 1 )

Submission status: Accepted

Solution code:
import sys
import math
import bisect

def main():
    n, i = map(int, input().split())
    j = n + 1 - i
    print(j)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N, i = lr()
answer = N + 1 - i
print(answer)

Submission status: Accepted

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

print(N - i + 1)

Submission status: Accepted

Solution code:
Ni = list(map(int, input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':

    ABC_107_A()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys
# import math
# from string import ascii_lowercase, ascii_upper_case, ascii_letters, digits, hexdigits
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from operator import itemgetter              # itemgetter(1), itemgetter('key')
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations  # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate             # accumulate(iter[, f])
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from copy import deepcopy                    # to copy multi-dimentional matrix without reference
# from fractions import gcd                    # for Python 3.4 (previous contest @AtCoder)


def main():
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79...e+308
    # inf = 2 ** 64 - 1               # (for fast JIT compile in PyPy) 1.84...e+19
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    n, i = mi()
    print(n + 1 - i)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- cording:utf-8 -*-

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,m = map(int,input().split())

print(N-m+1)

Submission status: Accepted

Solution code:
t, s = map(int, input().split())
print(t - s + 1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

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

print(N-i+1)

Submission status: Accepted

Solution code:
MOD = 10 ** 9 + 7
INF = 10 ** 11
import sys
sys.setrecursionlimit(100000000)

def main():
    N,i = map(int,input().split())
    print(N - i + 1)
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

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

print(n-i+1)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
n, i = map(int, input().split())
print(n-i+1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
N, i = map(int, input().split())
print(N - i + 1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(n - i + 1)

Submission status: Accepted

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

Submission status: Accepted

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

print(N-i+1)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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))  # type: int
    i = int(next(tokens))  # type: int
    solve(N, i)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x = input().split()
n = int(x[0])
i = int(x[1])
print(n - i + 1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

Submission status: Accepted

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

Submission status: Accepted

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

print(a-b+1)

Submission status: Accepted

Solution code:
def main():
    N, i = map(int, input().split())
    print(N-i+1)
if __name__ == "__main__":
    main()

Submission status: Accepted

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

print(n-k+1)

Submission status: Accepted

Solution code:
n,p=map(int,input().split())










print(n-p+1)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
c="Wingardium Leviosa"
print(a-b+1)

Submission status: Accepted

Solution code:
x=input()
y=x.split()
y = list(map(int,y))
print(y[0]-y[1]+1)

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(N -i + 1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

N, i = nm()
print(1 if N == 1 else N - i + 1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
icase=0
if icase==0:
    n,i=map(int,input().split())
    print(n-i+1)

Submission status: Accepted

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

print(N-i+1)

Submission status: Accepted

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

print(n-(i-1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import collections
import sys

#input = sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]

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

Submission status: Accepted

Solution code:
#!/usr/local/bin python
# -*- coding: utf-8 -*-
#
# ~/PycharmProjects/atcoder/A-Train.py
#
n, i = map(int, input().split())
print(n-i+1)

Submission status: Accepted

Solution code:
s = input()
l=s.split(" ")
print(int(l[0])-int(l[1])+1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print(a+1-b)
#Source code should be longer than 50 charactersSource code should be longer than 50 charactersSource code should be longer than 50 charactersSource code should be longer than 50 charactersSource code should be longer than 50 charactersSource code should be longer than 50 charactersSource code should be longer than 50 charactersSource code should be longer than 50 charactersSource code should be longer than 50 characters

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
IS = lambda: sys.stdin.readline().rstrip()
II = lambda: int(IS())
MII = lambda: list(map(int, IS().split()))

def main():
    n, i = MII()
    print(n-i+1)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
  #n = int(input())
  #s = input()
  #s = input().split()
  n,i = list(map(int,input().split()))
  #a = [input() for i in range(n)]
  #a = [int(input()) for i in range(n)]
  #a = [input().split() for i in range(n)]
  #a = [list(map(int,input().split())) for i in range(n)]
  ans = 0
  count = 0
  lis = []
  
  print(n-(i-1))

if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:



def solve():

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


if __name__ == "__main__":
    solve()

Submission status: Accepted

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

count = n - i + 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,i=[int(i) for i in input().split()]

print(n-i+1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#ABC-107-A
N, i = map(int, input().split())
print(N - i + 1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import os

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

MOD = 10 ** 9 + 7


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def Train(n , i):

    return n - i + 1 if n != 1 else 1

def main():
    n , i = map(int , input().split())
    print(Train(n , i))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,i= map(int,input().split())
li = []
for j in range(1,N+1):
    li.append(j)
print(li[-i])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

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

Submission status: Accepted

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

Submission status: Accepted

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

print(n-i+1)

Submission status: Accepted

Solution code:
from collections import deque
from collections import Counter
from itertools import product, permutations,combinations
from operator import itemgetter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right, bisect
#pypyではscipy, numpyは使えない
#from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson, minimum_spanning_tree
#from scipy.sparse import csr_matrix, coo_matrix, lil_matrix
#import numpy as np
from fractions import gcd
from math import ceil,floor, sqrt, cos, sin, pi, factorial
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')
from datetime import datetime as dt

def main():
  n, i = map(int, readline().split())
  print(n-i+1)
  
  
  
if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
# ABC 107: A – Train
n, i = [int(s) for s in input().split()]
print(n - i + 1)

Submission status: Accepted

Solution code:
import itertools
import fractions
def main():
  n,i = map(int, input().split())
  print(n-i+1)
if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

n, i = map(int, sys.stdin.readline().split())

def main():
    j = n - i + 1
    print(j)

if __name__ ==  '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if __name__ == '__main__':
    a = [int(i) for i in input().split()]
    
    print(a[0]+1-a[1])

Submission status: Accepted

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

Submission status: Accepted

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

answer = N - i + 1

print(answer)

Submission status: Accepted

Solution code:
# coding: utf-8
N, i = map(int, input().split())
# print(N, i)
print(N  + 1 - i)

Submission status: Accepted

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

Submission status: Accepted

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

print(N-i+1)

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!python3

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


def main():
    ans = N - i + 1
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n, i = map(int, input().split())
    train = list(range(1, n+1))[::-1]
    ans = train.index(i) + 1
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
n, i = map(int, input().split())
print(n-i+1 if abs(n - i ) >= n//2 else n - i + 1)

Submission status: Accepted

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

print(N+1-i)

Submission status: Accepted

Solution code:
#abc107 a
n,i=map(int,input().split())
print(n-i+1)

Submission status: Accepted

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