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.*;

public class flowers2
{
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int r = (int)in.nextLong();
		int g = (int)in.nextLong();
		int b = (int)in.nextLong();
		// int count = 0;
		// int min = Math.min(r, g);
		// min = Math.min(min, b);
		// int reduce = (min/3)*3;
		// count += reduce;
		// r-=reduce;
		// g-=reduce;
		// b-=reduce;
		int n1=0;
		
		int r1=0;
		int g1=0;
		int b1=0;
		if(r>3)
			r1=r/3;
		if(g>3)
			g1=g/3;
		if(b>3)
			b1=b/3;
		n1+=r1;
		n1+=g1;
		n1+=b1;
		
		int r2a=r-3*r1;
		int g2a=g-3*g1;
		int b2a=b-3*b1;
		
		int h1=Math.min(r2a,Math.min(g2a,b2a));
		n1+=h1;
		
		int n7=0;
		
		int r7=0;
		int g7=0;
		int b7=0;
			r7=r/3;
			g7=g/3;
			b7=b/3;
		n7+=r7;
		n7+=g7;
		n7+=b7;
		
		int r7a=r-3*r7;
		int g7a=g-3*g7;
		int b7a=b-3*b7;
		
		int h7=Math.min(r7a,Math.min(g7a,b7a));
		n7+=h7;
		
		int n0=0;
		for(int i=0;i<=4;i++)
		{
			int n2=0;
			int k=Math.min(r,Math.min(g,b));
			if(k-i>0)
				k-=i;
			n2+=k;
			int r2=r-k;
			int g2=g-k;
			int b2=b-k;
			n2+=r2/3;
			n2+=g2/3;
			n2+=b2/3;
			n0=Math.max(n0,n2);
		}
		System.out.println(Math.max(Math.max(n1,n0),n7));
	}
}