using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApp1 { class Program { static void Main( string[] args ) { long x = long.Parse( args[0] ); long y = long.Parse( args[1] ); long z = long.Parse( args[2] ); Console.WriteLine( ( z - ( x <= z ? 1 : 0 ) - ( y <= z ? 1 : 0 ) ) ); } } }