101070: [AtCoder]ABC107 A - Train

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

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

Input

题意翻译

给定两个数 $N,i(N\leq100,i\leq N)$,找到一个 $j$,使得 $N$ 辆火车中从前往后数第 $i$ 辆与从后往前数第 $j$ 辆是同一辆火车。

加入题单

算法标签: