Fox Ciel has some flowers: r red flowers, g green flowers and b blue flowers. She wants to use these flowers to make several bouquets. There are 4 types of bouquets:

  * To make a "red bouquet", it needs 3 red flowers. 
  * To make a "green bouquet", it needs 3 green flowers. 
  * To make a "blue bouquet", it needs 3 blue flowers. 
  * To make a "mixing bouquet", it needs 1 red, 1 green and 1 blue flower. 



Help Fox Ciel to find the maximal number of bouquets she can make.

Input

The first line contains three integers r, g and b (0 ≤ r, g, b ≤ 109) — the number of red, green and blue flowers.

Output

Print the maximal number of bouquets Fox Ciel can make.

Examples

Input

3 6 9


Output

6


Input

4 4 4


Output

4


Input

0 0 0


Output

0

Note

In test case 1, we can make 1 red bouquet, 2 green bouquets and 3 blue bouquets.

In test case 2, we can make 1 red, 1 green, 1 blue and 1 mixing bouquet.
import java.util.Scanner;


public class Main {
	public static void main(String[]args){
		Scanner s=new Scanner(System.in);
		long a=s.nextInt(), b=s.nextInt(),c=s.nextInt();
		long a1=a,b1=b,c1=c;
		long total=0,total2=0;
		long mod;
		if(a<=b && a<=c){
			total=a;
			b=b-a;
			c=c-a;
			total+=b/3+c/3;
			
		}else{
			if(b<=a && b<=c){
				total=b;
				a=a-b;
				c=c-b;
				total+=a/3+c/3;
				
			}else{
				total=c;
				a=a-c;
				b=b-c;
				total+=a/3+b/3;
			}
		}//Empieza mayor
		if(a1>=b1 && a1>=c1){
			total2=a1/3;
			mod= a1 %3;
			if(mod<=b1 && mod <=c1){
			  total2+=mod;
			  b1=b1-mod;
			  c1=c1-mod;
			  total2+=b1/3+c1/3;
			}else{
				total2=b1/3+c1/3;
			}
			
		}else{
			if(b1>=a1 && b1>=c1){
				total2=b1/3;
				mod= b1 %3;
				if(mod<=a1 && mod <=c1){
				  total2+=mod;
				  a1=a1-mod;
				  c1=c1-mod;
				  total2+=a1/3+c1/3;
				}else{
					total2=a1/3+c1/3;
				}
				
			}else{
				total2=c1/3;
				mod= c1 %3;
				if(mod<=a1 && mod <=b1){
				  total2+=mod;
				  b1=b1-mod;
				  a1=a1-mod;
				  total2+=b1/3+a1/3;
				}else{
					total2=b1/3+a1/3;
				}
			}
		}
		if(total>=total2){System.out.println(total);}
		else{System.out.println(total2);}
		
	}

}
