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,Y= [int(i) for i in input().split()]
print(N-Y+1)

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin

na = lambda: list(map(int, stdin.readline().split()))
n, i = na()

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())
if 1 <= n <= 100 and 1 <= i <= n:
    print(n - i + 1)
else:
    print('hoge!')

Submission status: Accepted

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

print(N + 1 - i)

Submission status: Accepted

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

print(a-b+1)

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    print(main())

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import sys
import queue
from collections import Counter
from itertools import accumulate
from fractions import gcd
from functools import reduce


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

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

sys.setrecursionlimit(10000)

mod = 1000000007

"""
# 0埋め, 小数点出力桁指定時のときの出力
a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654

# 文字列をリストに格納
char_list = list("abcd") # ["a","b","c","d"]

# 標準入力取得
## 文字列
    = sys.stdin.readline().rstrip()
    = list(sys.stdin.readline().rstrip())

## 数値
    = int(sys.stdin.readline())
    = map(int, sys.stdin.readline().split())
    = list(map(int, sys.stdin.readline().split()))
    = [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""

if __name__ == "__main__":
    N, i = map(int, sys.stdin.readline().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 = list(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 = [int(x) for x 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:
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:
print(eval(input().replace(' ', '-')) + 1)

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:
def main():
    N, i = map(int, input().split())

    print(N - i + 1)

main()

Submission status: Accepted

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


if __name__ == "__main__":
    print(solve())

Submission status: Accepted

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

print(a-b +1)

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 = list(map(int, input().split()))

print(n-i+1)

Submission status: Accepted

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


if __name__ == "__main__":
    test()

Submission status: Accepted

Solution code:
import math

# inputList=[]
# for i in range(6):
#     inputNum = input()
#     inputList.append(inputNum)
inputa = input().split()
# inputb = input().split()

# inputa = [int(n) for n in inputa]
# inputa.sort()

a = int(inputa[0])
b = int(inputa[1])
# c = int(inputa[2])

# x = int(inputb[0])
# y = int(inputb[1])

print(a - b + 1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#list(map(int,input().split()))
n,i = list(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, Xi = map(int,input().split())

print(N-Xi+1)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from operator import itemgetter

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

if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
#107

N, i = map(int,input().rstrip().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:
def main():
    n,i = map(int, input().split())

    print(n-i+1)


if __name__ == '__main__' :
    main()

Submission status: Accepted

Solution code:
#ABC108
a,b = map(int,input().split())
print(a - b + 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:
K = input().split()

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

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+1-i)

Submission status: Accepted

Solution code:
from functools import reduce
import math

def main():
    # 文字列の2進数を数値にする
    # '101' → '5'
    # 文字列の頭に'0b'をつけてint()にわたす
    # binary = int('0b'+'101',0)

    # 2進数で立っているbitを数える
    # 101(0x5) → 2
    # cnt_bit = bin(5).count('1')
    
    # N! を求める
    # f = math.factorial(N)

    # N の逆元
    # N_inv = pow(N,MOD-2,MOD)

    # nCr
    # Nの階乗 * rの階乗の逆元 * n-rの階乗の逆元
    
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    INF = float("inf")

    # 大きな素数
    MOD = 10**9+7
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]    
    N, i = (int(_) for _ in input().split())  
    print(N-i+1)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac

setrecursionlimit(1000000)


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

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(l):
	x = l.pop()
	y = l.pop()
	while(x%y!=0):
		z = x%y
		x = y
		y = z
	l.append(min(x,y))
	return gcd(l) if len(l) > 1 else l[0]

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
inp = input()
num = inp.split(' ')
N = int(num[0])
i = int(num[1])
result = N - i + 1
print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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:
l = [int(i) for i in input().split(" ")]
print(l[0]-l[1]+1)

Submission status: Accepted

Solution code:

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

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:
N, i = map(int, input().split())

print( N - i + 1)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

# print(N)
# print(i)

print(N - i + 1)

Submission status: Accepted

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

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

# solve & output
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())
print(n-i+1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x,y = map(int,input().split())

print(x + 1 - y)

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,k=map(int,input().split())
res=n-k+1
print(res)

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007

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

#B
def B():
    x1, y1, x2, y2 = LI()
    a = x2 - x1
    b = y2 - y1
    print(x2 - b, y2 + a, x1 - b, y1 + a)
    return

#C
def C():
    n, k = LI()
    if k % 2:
        print((n // k)** 3)
    else:
        print(int((n//k)**3 + ((n-k/2)//k+1)**3))
        
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    A()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N,i = [int(i) for i in input().split()]
print(N - i + 1)

Submission status: Accepted

Solution code:
d = list(map(int, input().split()))
N = d[0]
i = d[1]
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)

main()

Submission status: Accepted

Solution code:
n,i=map(int,input().split())
if (1<=n<=100)and (1<=i<=n):
    j=n-i+1
print(j)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

print(l[0] - l[1] + 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())
#ls = list(map(int,input().split()))
#n = int(input())
#s = input()

print(n + 1 - i)

Submission status: Accepted

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

print(n-(i-1))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

N, i = nl()

print(N - i + 1)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    # parse
    N, i = parse()
    # compute
    result = compute(N, i)
    # show result
    print(result)

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

def parse():
    vars = split_stdin(get_stdin())
    return int(vars[0]), int(vars[1])

def get_stdin():
    return input()

def split_stdin(stdin_val, delim = ' '):
    return [x for x in stdin_val.split(delim) if x != '']

if __name__ == "__main__":
    main()

Submission status: Accepted

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


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


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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:
# INPUT
n, i = map(int, input().split())

# PROCESS
answer = n-i+1

# OUTPUT
print(answer)

Submission status: Accepted

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

Submission status: Accepted

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


abc()

Submission status: Accepted

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

print(n+1-p)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
 
n,m = list(map(int, input().split()))
print(n-m+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:
a,b = list(map(int,input().split(" ")))
print(a-b+1)

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 = [int(ni) for ni in 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 numpy as np
N, i = [int(j) for j in input().split()]

print(N-i+1)

Submission status: Accepted

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

print(n - a +1)

Submission status: Accepted

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

Submission status: Accepted

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

print(n+1-k)

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 = [int(i) for i in input().split()]
print(n - i + 1)

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

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

Submission status: Accepted

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


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


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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:
from sys import stdin
 
N, i = [int(x) for x in stdin.readline().rstrip().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())
print(int(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:
a, b = input().split()
a, b = int(a), int(b)
print(a+1-b)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
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:])

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:
first=input()
(N, i)=first.split()
N=int(N)
i=int(i)
answer=N-(i-1)
print(answer)

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())
ans = N - i + 1
print(ans)

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())
ans=0
ans=n-i+1
print(ans)

Submission status: Accepted

Solution code:
import sys


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

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}


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

Submission status: Accepted

Solution code:
a, b = [int(i) for i in input().split()]
print(a - b + 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())
print( n - i + 1)

Submission status: Accepted

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

print (N-i+1)

Submission status: Accepted

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

print(b-c+1)

Submission status: Accepted

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

print (N-i+1)

Submission status: Accepted

Solution code:
###############################################################################

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()

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())
print((n+1) - i)

Submission status: Accepted

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

Submission status: Accepted

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

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+1 - i
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(int(a-b+1))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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(' '))
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:
nilist=input().split()
n=int(nilist[0])
i=int(nilist[1])
ans=n-i+1
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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()

Submission status: Accepted

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

temp = N - i
print(temp + 1)

Submission status: Accepted

Solution code:

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()

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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])

Submission status: Accepted

Solution code:
#!usr/bin/env python3
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

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

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

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

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

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#I
def I_():
    return

#J
def J():
    return

#Solve
if __name__ == "__main__":
    D()

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

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