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.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;


public class CielAndFlowers {	

	public static void main(String[] args) throws IOException {
		MyScanner sc = new MyScanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		StringTokenizer st;
		
		//System.out.println(5 % 3);
		int r = sc.nextInt();
		int g = sc.nextInt();
		int b = sc.nextInt();
		
		long ans = 0;
		
		for(int i = 2;i >= 0;i--){
			if (r - i < 0 || g - i < 0 || b - i < 0)
				continue;
			ans = Math.max(ans, i + (r - i)/3 + (g - i)/3 + (b - i)/3);
		}
		
		pw.println(ans);
		/*int ra = r;
		int ga = g;
		int ba = b;
		int ans1 = 0;
		
		while (r > 2 || g > 2 || b > 2){
			ans1 += r/3;
			r = r % 3;
			ans1 += g/3;
			g = g % 3;
			ans1 += b/3;
			b = b % 3;
		}
		
		while (r >= 1 && g >= 1 && b >= 1){
			r -= 1;
			g -= 1;
			b -= 1;
			ans1++;
		}
		
		//int ans2 = 0;
		int ans2 = Math.min(ra, Math.min(ga, ba));
		
		//while (ra > 2 || ga > 2 || ba > 2){
		ra -= ans2;
		ga -= ans2;
		ba -= ans2;
		//}
		
		while (ra > 2 || ga > 2 || ba > 2){
			
			ans2 += ra/3;
			ra = ra % 3;
			ans2 += ga/3;
			ga = ga % 3;
			ans2 += ba/3;
			ba = ba % 3;
		}
		
		pw.println(Math.max(ans2, ans1));*/
		pw.close();

	}

	static class MyScanner {
		StringTokenizer st;
		BufferedReader br;

		public MyScanner(InputStream s){	
			br = new BufferedReader(new InputStreamReader(s));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens()) 
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
		
		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}
		
		public double nextDouble() throws IOException {
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-') {
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++){
				if(x.charAt(i) == '.') {
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else {
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}
		
		public boolean ready() throws IOException {
			return br.ready();
		}


	}
}
