import java.util.*; public class Main { public static void main(String[] args) throws Exception { // Your code here! Scanner sc = new Scanner(System.in); int X = sc.nextInt(); int Y = sc.nextInt(); int Z = sc.nextInt(); int ZZ = Z; int ans = 0; for(int i=0;iY) { Y++; } else if(X<=Y) { X++; } ZZ--; } if(X>Y) { ans = Y; } else { ans = X; } System.out.println(ans); } }