Problem:
Score : 100 points

Problem Statement

Snuke has N integers: 1,2,\ldots,N.
He will choose K of them and give those to Takahashi.

How many ways are there to choose K consecutive integers?

Constraints

All values in input are integers.

1 \leq K \leq N \leq 50

Input

Input is given from Standard Input in the following format:

N K

Output

Print the answer.

Sample Input 1

3 2

Sample Output 1

2

There are two ways to choose two consecutive integers: (1,2) and (2,3).

Sample Input 2

13 3

Sample Output 2

11

Solution in C# (Mono 4.6.2.0) (judge verdict: Runtime Error)

using System;
using System.Linq;
using System.Threading.Tasks;
using static System.Console;
using static System.Math;
class program{
  static void Main(string[] args){
    program p = new program();
    p.Run();
  }
  void Run(){
	int[] inp = Readint();
    int R=inp[0];
    int G=inp[1];
    int B=inp[2];
    int N=inp[3];
    int c=0;
    int mr=(int)(N/R);
    int mg=(int)(N/G);
    int mb=(int)(N/B);
    int a=0,b=0;
    int[,] total=new int[mr+1,mg+1];
    Parallel.For(0,mr+1,r=>{
      Parallel.For(0,mg+1,g=>{
        a=N-r*R-g*G;
        b=(int)(a/B);
        if(a==B*b){
          c++;
        }
      });
    });
    WriteLine(c.ToString());
  }

  int[] Readint(){
    string[] s = ReadLine().Split();
    int[] res=new int[s.Length];
    Parallel.For(0,s.Length,i=>{
      res[i]=int.Parse(s[i]);
    });
    return res;
  }
}