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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(N + i - 1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n, k = map(int, input().split())
if n%k:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print((n-i)+1 if n%2 == 1 else n-i)

Submission status: Wrong Answer

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

print(N-i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(n-i)

Submission status: Wrong Answer

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

print(n-1+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def train(n,m):
    return n-m
n,m= map(int,input().split())
train(n,m)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# WIP (WA: 1_01.txt, 1_06.txt, 1_07.txt)
import sys
input_s = sys.stdin.readline

N, K = map(int, input_s().split())
xxx = list(map(int, input_s().split()))

min_elapsed_time =  float("inf")
for left, right in zip(xxx, xxx[K - 1:]):
    elapsed_time = right - left + min(abs(left), abs(right))
    """
    right - left : a section distance
    min(abs(left), abs(right)) : a start point to move the section
    """
    min_elapsed_time = \
        elapsed_time if elapsed_time < min_elapsed_time else min_elapsed_time

print(min_elapsed_time)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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__':
    C()

Submission status: Wrong Answer

Solution code:
s = input()
s_list = list(s)
print(s_list)
l = len(s_list) - 2
a = s_list[0] + str(l) + s_list[-1]
print(a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(N-i-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


if N-i == 0:
    print(N)

elif N-i != 0:
    print(N-i+1)

Submission status: Wrong Answer

Solution code:
print(sum([int(i) for i in input().split()])+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
print(eval("-".join(input())))

Submission status: Wrong Answer

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

print(n - i)

Submission status: Wrong Answer

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

if N==1:
    print 1
    exit()

L = (range(1,N+1))
L = sorted(L, reverse=True)

for k in range(1, len(L)):
    if L[k] == i:
        break

#print "hi", k
#if k!=1:
#    k+=1
print k+1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N, i = [int(n) for n in range(2)]

print(N + 1 - i)

Submission status: Wrong Answer

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

if a and b == 1:
    print(1)
else:
    print(a-b+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def solve(a,b):
    c=a-b+1
    return(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A = [int(i) for i in input().split(" ")]
ans = A[0] + A[1] + 1

print(ans)

Submission status: Wrong Answer

Solution code:
A = [int(i) for i in input().split(" ")]
ans = A[0] + A[1] -1

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
l = raw_input()
lst = map(int, l.split())


a = lst[1] - lst[0]
print(a+1)

Submission status: Wrong Answer

Solution code:
l = raw_input()
lst = map(int, l.split())
print(lst)

a = lst[1] - lst[0]
print(a+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
chars = input()

raw_input = chars.split(' ')

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n,i=list(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:
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:
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(1 + eval(input().replace(" ", "-")))

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

print(k-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:
n,m = [int(x) for x in input().split()]
print(n-m+1)

Submission status: Accepted

Solution code:
def mapt(fn, *args):
    return list(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))

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


main()

Submission status: Accepted

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

Submission status: Accepted

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

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 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 main():
    n, i = LI()
    print(n-i+1)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(eval(input().replace(' ','-'))+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:
train_len, target_vehicle = map(int, input().split())

target_from_backside = train_len - (target_vehicle - 1)
print(target_from_backside)

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

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    N, x = map(int, readline().split())

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

Submission status: Accepted

Solution code:
import sys

mod =10**9+7

def input():
    return sys.stdin.readline().rstrip()


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






if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

solve()

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N, i = map(int, readline().split())

    print(N - i + 1)

    return


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 = 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:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [list(input()) for _ in range(n)]
#a = [int(input()) for _ in range(n)]

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 sys


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


def main():
    n, i = nm()
    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:

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

print(n - m + 1)

Submission status: Accepted

Solution code:
# 初期入力 2020-0730-2150
import sys
#input = sys.stdin.readline  #文字列では使わない

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

Submission status: Accepted

Solution code:
tmp = input().split(" ")

print(int(tmp[0]) - int(tmp[1]) + 1)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N,I = (int(T) for T in 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:
# abc107_a.py
# https://atcoder.jp/contests/abc107/tasks/abc107_a

# 問題文
# N両編成の列車があります。 この列車の前から i両目は、後ろから何両目でしょうか？

# 制約
#     1≤N≤100
#     1≤i≤N

# 入力
# 入力は以下の形式で標準入力から与えられる。
# N i

# 出力
# 答えを出力せよ。

# 入力例 1
# 4 2

# 出力例 1
# 3

# 4両編成の列車において、前から 2 両目の車両は、後ろから 3両目です。

# 入力例 2
# 1 1

# 出力例 2
# 1

# 入力例 3
# 15 11

# 出力例 3
# 5


def calculation(lines):
    N, i = list(map(int, lines[0].split()))
    # K = int(lines[1])
    return [N-i+1]


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['4 2']
        lines_export = [3]
    if pattern == 2:
        lines_input = ['1 1']
        lines_export = [1]
    if pattern == 3:
        lines_input = ['15 11']
        lines_export = [5]
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    if len(args) == 1:
        mode = 0
    else:
        mode = int(args[1])
    return mode


# 主処理
def main():
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
if __name__ == '__main__':
	n,m = 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:
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:
N,i=map(int,input().split())

print((N-i)+1)

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input().split(" ")
a,b = int(s[0]), int(s[1])
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,k = map(int, raw_input().split(' '))
print n - k + 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:
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:
import sys
N,i = map(int,input().split())
if not ( 1 <= N <= 100 and 1 <= i <= N ):
    sys.exit()

print(N - i + 1)

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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

    ans = N - i + 1

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
rm = lambda: map(int, sys.stdin.buffer.readline().split())

a, b = rm()
print(a-b+1)

Submission status: Accepted

Solution code:
import sys
rm = lambda: map(int, sys.stdin.buffer.readline().split())

a, b = rm()
print(a+1-b)

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

Submission status: Accepted

Solution code:
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    N, i = LI()

    print(N-i+1)

if __name__ == '__main__':
    resolve()

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