using System; using System.Linq; public class Program { public static void Main() { var input = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToList(); var dif = input[1] - input[0] + 1; Console.Write("{0}", (input[2] >= dif) ? dif : input[2]); return; } }