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:
# -*- coding: utf-8 -*-

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

print(a - b + 1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#107 A
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())
ans = n - i + 1
print(ans)

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:
a = list(map(int, input().split(" ")))
print(a[0] - a[1] + 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:
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()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python

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

    
        

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
print(int(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=input().split()
a=int(N)
b=int(i)
print(a+1-b)

Submission status: Accepted

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

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:
import math
import sys

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

print(X-Y+1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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))  # type: int
    i = int(next(tokens))  # type: int
    solve(N, 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,K=map(int,input().split())
print(N-K+1)

Submission status: Accepted

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

Submission status: Accepted

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

print(N+1-i)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(n-i+1)

Submission status: Accepted

Solution code:
# coding: utf-8

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

print(N - i + 1)

Submission status: Accepted

Solution code:
'''
A. train
'''

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

print(main())

Submission status: Accepted

Solution code:
n, i = input().split(" ")
print(int(n) - int(i) + 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 = map(int,input().split())
print(len(range(N)[i-1:]))

Submission status: Accepted

Solution code:
# 2019/03/28
# AtCoder Beginner Contest 107 - A

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

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

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(x) for x in input().split()]
print(N - i + 1)

Submission status: Accepted

Solution code:
N, i = [int(item) for item in 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:
n, i = map(int, input().split())

count = 0

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

Submission status: Accepted

Solution code:
a, b = map(int, raw_input().split())
print a - b + 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:
ni=input().split()
N=int(ni[0]);i=int(ni[1])
print(N-i+1)

Submission status: Accepted

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

print(N - i + 1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(n-m+1)

Submission status: Accepted

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

print(N-i+1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(N-i+1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# /user/bin/python
# -*- coding: utf-8 -*-
import sys 

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
list1 = [int(a) for a in input().split()]
list1_0 = list1[0] #N
list1_1 = list1[1] #i

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

Submission status: Accepted

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

Submission status: Accepted

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

print(n-k+1)

Submission status: Accepted

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

Submission status: Accepted

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

ans = N - i + 1

print(ans)
print()

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc107/tasks/abc107_a
n, i = [int(x) for x in input().split()]
print(n - i + 1)

Submission status: Accepted

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


if __name__ == '__main__':
    print(solve(input()))

Submission status: Accepted

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

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:
a,b = [int(i) for i in 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,i = (int(x) for x in input().split())

ans = n-i+1

print(ans)

Submission status: Accepted

Solution code:
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools


sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]


def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


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

main()

Submission status: Accepted

Solution code:
import sys
import math
import collections
import itertools
import array
import inspect

# Set max recursion limit
sys.setrecursionlimit(1000000)


# Debug output
def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))


# Binary converter
def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in sys.stdin.readline().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v


# Width First Search (+ Distance)
def wfs_d(D, N, K):
    """
    D: 隣接行列(距離付き)
    N: ノード数
    K: 始点ノード
    """

    dfk = [-1] * (N + 1)
    dfk[K] = 0

    cps = [(K, 0)]
    r = [False] * (N + 1)
    r[K] = True
    while len(cps) != 0:
        n_cps = []
        for cp, cd in cps:
            for i, dfcp in enumerate(D[cp]):
                if dfcp != -1 and not r[i]:
                    dfk[i] = cd + dfcp
                    n_cps.append((i, cd + dfcp))
                    r[i] = True

        cps = n_cps[:]

    return dfk


# Depth First Search (+Distance)
def dfs_d(v, pre, dist):
    """
    v:  現在のノード
    pre: １つ前のノード
    dist: 現在の距離

    以下は別途用意する
    D: 隣接リスト(行列ではない)
    D_dfs_d: dfs_d関数で用いる，始点ノードから見た距離リスト
    """

    global D
    global D_dfs_d

    D_dfs_d[v] = dist

    for next_v, d in D[v]:
        if next_v != pre:
            dfs_d(next_v, v, dist + d)

    return


def sigma(N):
    ans = 0
    for i in range(1, N + 1):
        ans += i
    return ans


def comb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def bisearch(L, target):
    low = 0
    high = len(L) - 1
    
    while low <= high:
        mid = (low + high) // 2
        guess = L[mid]
        if guess == target:
            return True
        elif guess < target:
            low = mid + 1
        elif guess > target:
            high = mid - 1
    if guess != target:
        return False

# --------------------------------------------

dp = None


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


main()

Submission status: Accepted

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

N = int(N)
i = int(i)

print(N - i + 1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N,i = map(int, raw_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 = [int(x) for x in input().split()]

print(N - i + 1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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


if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
# A
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=[int(i) for i 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:
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:
m,n=map(int,input().split())
print(m-n+1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# Luis Yoichi Morales January 2019

from sys import stdin
import numpy as np

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(N + 1 - i)

Submission status: Accepted

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


main()

Submission status: Accepted

Solution code:
"""AtCoder"""

import sys
input = sys.stdin.readline

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

print(N - i + 1)

Submission status: Accepted

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

def main():
    na = list(map(int, input().split()))
    N, i = na[0], na[1]

    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:
def main():
    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(int(N)+1-int(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, str(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,k=map(int,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 = list(map(int, input().split()))
print(N-i+1)

Submission status: Accepted

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

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

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:
# -*- coding: utf-8 -*-


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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N,i = map(int, input().split())
print("{}".format(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())
if i!=n//2+1:
    print((n+1-i))
elif i==n//2+1:
    print(i)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, i = list(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:
def main():
    N, i = map(int, input().strip().split())
    print(N - i + 1)
 
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
x=input()
x=x.split()
N=int(x[0])
I=int(x[1])
ans=N-I+1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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())
x = N -I
x+=1
print(x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=input().strip().split(" ")
b=[int(i) for i in a]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# https://beta.atcoder.jp/contests/abc107/tasks/abc107_a
def solve():
    N, i = map(int, input().split())
    print(N - i + 1)


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

answer = N - i + 1
print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
val1,val2=input().split(" ")
val3=int(val1)-int(val2)+1
print(val3)

Submission status: Accepted

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

Submission status: Accepted

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

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:
ni = list(map(int, input().split()))
n = ni[0]
i = ni[1]
print(n - i + 1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


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


main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


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, raw_input().split())
print N + 1 -i

Submission status: Accepted

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

train=[]
js=0

for x in range(1,n+1):
    train.append(x)
    
train=train[::-1]

for x in train:
    js +=1
    if x==i:
        print(js)
        break

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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()]
T = [i for i in range(N)]
L = N - T[i-1] if N != 1 else 1
print(L)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

o = k  -n+1 
print(o)

Submission status: Accepted

Solution code:
kkkk,nnnn=map(int,input().split())
o=kkkk-nnnn+1
print(o)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, i = [int(_) for _ 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:
n,i=map(int,input().split())
if 1<=n<=100:
    if 1<=i<=n:
         j=n-i+1
print(j)

Submission status: Accepted

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

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())
if 1<=n<=100:
    if 1<=i<=n:
         j=n-i+1
print(j)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
totalnumber,numberfromfront=map(int, input().split())
numberfromback=totalnumber-numberfromfront+1
print(numberfromback)

Submission status: Accepted

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

c=a-b+1
if a==0:
    c=0
print (c)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#this is the problem no5
a,b=map(int,input().split())
print(a-b+1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

a = int(a)
b = int (b)
x= (a - b) + 1

print (x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

value=input()
x,z = value.split()
x=int(x)
z = int(z)
print ( x - z +1)

Submission status: Accepted

Solution code:
def train(N,j):
    y = N - j +1
    return y

value=input()
x,z = value.split()
x=int(x)
z = int(z)
print ( train (x,z))

Submission status: Accepted

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

a = int(a)
b = int(b)

x = (a - b) + 1

print(x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#N is no. of train cars
#the i-th car from the front is the j-th car from the back
#j is the output

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
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())
j=0
for v in range(n):
    j=j+1
    if (n-1)>= i:
        
        n=n-1

    else:    
        break
 
print (j)

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