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.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.HashSet;
import java.util.StringTokenizer;


public class Classical {
	public static void main(String[] args) throws Exception {
		FastScanner sc = new FastScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		long R = sc.nextLong();
		long G = sc.nextLong();
		long B = sc.nextLong();
		long ans = 0;
		for(int a=0;a<=Math.min(R,3);a++){
			for(int b=0;b<=Math.min(G,3);b++){
				for(int c=0;c<=Math.min(B,3);c++){
					int thing = Math.min(Math.min(a,b),c);
					ans=Math.max(ans,thing+solve(R-a,B-b,G-c));
				}
			}
		}
		out.println(ans);
		out.close();
	}


	
	private static long solve(long R, long G, long B) {
		if(R<0||B<0||G<0)return -99999;
		long ans = 0;		
		
		long triple = Math.min(Math.min(R/3,G/3),B/3);
		ans+=triple*3;
		R-=triple*3;
		G-=triple*3;
		B-=triple*3;
		
		while(R!=0&&B!=0&&G!=0){
			ans++;
			R--;
			B--;
			G--;
		}
		ans+=R/3;
		ans+=G/3;
		ans+=B/3;
		return ans;
	}



	private static String out(int[] array) {
		StringBuilder out = new StringBuilder();
		int a= 0;
		while(true){
			if(array[a]==0)break;
			out.append(""+((char)(array[a]+'a'-1)));
			a++;
		}
		return out.reverse().toString();
	}



	private static void increment(int[] array) {
		int pos = 0;
		while(true){
			array[pos]++;
			if(array[pos]==27)
				array[pos++]=1;
			else break;
		}
		
	}



	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;
		
		public FastScanner(InputStream in) throws Exception{
			br = new BufferedReader(new InputStreamReader(in));
			st = new StringTokenizer(br.readLine().trim());
		}
		public int numTokens() throws Exception {
			if(!st.hasMoreTokens()){
				st = new StringTokenizer(br.readLine().trim());
				return numTokens();
			}
			return st.countTokens();
		}
		public boolean hasNext() throws Exception{
			if(!st.hasMoreTokens()){
				st = new StringTokenizer(br.readLine().trim());
				return hasNext();
			}
			return true;
		}
		public String next() throws Exception {
			if(!st.hasMoreTokens()){
				st = new StringTokenizer(br.readLine().trim());
				return next();
			}
			return st.nextToken();
		}
		public double nextDouble() throws Exception{
			return Double.parseDouble(next());
		}
		public float nextFloat() throws Exception{
			return Float.parseFloat(next());
		}
		public long nextLong() throws Exception{
			return Long.parseLong(next());
		}
		public int nextInt() throws Exception{
			return Integer.parseInt(next());
		}
		public String nextLine() throws Exception{
			return br.readLine();
		}
	}


}
