import java.util.Scanner; import java.lang.Math; public class No920 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int redBall = sc.nextInt(); int blueBall = sc.nextInt(); int whiteBall = sc.nextInt(); sc.close(); while(whiteBall > 0){ if(redBall > blueBall){ blueBall++; }else if(redBall <= blueBall){ redBall++; } whiteBall--; } System.out.println(Math.min(redBall,blueBall)); } }