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 C# (Mono 4.6.2.0) (judge verdict: Runtime Error)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace test
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();

            int H = int.Parse(s.Split(' ')[0]);
            int W = int.Parse(s.Split(' ')[1]);

            List<string> Rows = new List<string>();

            for(int i = 0; i < H; i++)
            {
                string str = Console.ReadLine();
                if (str.Contains("#"))
                {
                    Rows.Add(str);
                } 
            }

            bool[] WhiteColumn = Enumerable.Repeat(true, W).ToArray();

            for (int j = 0; j < W; j++)
            {
                for (int i = 0; i < Rows.Count; i++)
                {
                    if(Rows[i][j] != '.')
                    {
                        WhiteColumn[j] = false;
                        break;
                    }
                }
            }

            for(int i = W - 1; 0 <= i; i--)
            {
                if(WhiteColumn[i])
                {
                    for(int j = 0; j < Rows.Count; j++)
                    {
                        Rows[j] = Rows[j].Remove(i, 1);
                    }
                }
            }

            for (int i = 0; i < Rows.Count; i++)
            {
                if (Rows[i].Contains("#"))
                {
                    Console.WriteLine(Rows[i]);
                }
            }
        }
    }
}