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

Solution in Java8 (OpenJDK 1.8.0) (judge verdict: Accepted)

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {
public static void main(String[] args) throws IOException {
	Main mainObj = new Main();
	mainObj.solve();
}

public void solve() throws IOException {
	FastScanner fs = new FastScanner();
	int n = fs.nextInt();
	int i = fs.nextInt();
	
	System.out.println(n - i +1);
}



public class FastScanner {

	BufferedReader reader;
	private StringTokenizer st;

	public FastScanner() {
		st = null;
		reader = new BufferedReader(new InputStreamReader(System.in));
	}

	public String next() throws IOException {
		if (st == null || !st.hasMoreElements()) {
			st = new StringTokenizer(reader.readLine());
		}
		return st.nextToken();
	}

	public String nextLine() throws IOException {
		st = null;
		String readLine = null;
		readLine = reader.readLine();
		return readLine;
	}

	public int nextInt() throws NumberFormatException, IOException {
		return Integer.parseInt(next());
	}

	public long nextLong() throws NumberFormatException, IOException {
		return Long.parseLong(next());
	}

	public int[] nextIntArr(int n) throws NumberFormatException, IOException {
		int[] retArr = new int[n];
		for (int i = 0; i < n; i++) {
			retArr[i] = nextInt();
		}
		return retArr;
	}

	public long[] nextLongArr(int n) throws NumberFormatException, IOException {
		long[] retArr = new long[n];
		for (int i = 0; i < n; i++) {
			retArr[i] = nextLong();
		}
		return retArr;
	}

	public void close() throws IOException {
		reader.close();
	}
}

}