package yukicorder; import java.util.Scanner; //TODO 見直し public class No_91 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int r = sc.nextInt(); int g = sc.nextInt(); int b = sc.nextInt(); System.out.println(solve(r,g,b)); } public static int solve(int r, int g, int b){ int basic = Math.min(Math.min(r,g),b); //各石の最低値 int red = r - basic; int green = g - basic; int blue = b - basic; int acce = basic; //暫定的なアクセサリーの数は変数basic while(true){ if(red == 0){ if(Math.max(green, blue) > 2){ if(blue > green){ blue -= 2; }else{ green -= 2; } }else{ break; } red++; } if(green == 0){ if(Math.max(red, blue) > 2){ if(blue > red){ blue -= 2; }else{ red -= 2; } }else{ break; } green++; } if(blue == 0){ if(Math.max(red, green) > 2){ if(red > green){ red -= 2; }else{ green -= 2; } }else{ break; } blue++; } red--; green--; blue--; acce++; } return acce; } }