using System; using System.Collections.Generic; using System.Linq; public class Yuki857 { public static void Main() { var xyz = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList(); var ans = xyz[2]; if(xyz[0] <= xyz[2]) ans -= 1; if(xyz[1] <= xyz[2]) ans -= 1; Console.WriteLine(ans); } }