import java.util.Scanner; 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(); int purpleBall = 0 ; if((redBall + blueBall) == 0){ purpleBall = whiteBall / 2; }else{ while(redBall > 0 && blueBall > 0){ redBall--; blueBall--; purpleBall++; } while(whiteBall > 0){ if((redBall + blueBall) > 0){ if(redBall < blueBall){ whiteBall--; blueBall--; purpleBall++; }else if (redBall > blueBall){ whiteBall--; redBall--; purpleBall++; }else { if(whiteBall < 2){ break; }else{ whiteBall -= 2; purpleBall++; } } } } } sc.close(); System.out.println(purpleBall); } }