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.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
    long MOD = 1000000007L;
    public class Obj implements Comparable<Obj>{
        public int a;
        public int b;
        
        public Obj(int a_, int b_){
            a = a_;
            b = b_;
        }
        
        public int compareTo(Obj other){
            if (a != other.a){
                return a - other.a;
            }else{
                return b - other.b;
            }
        }
        
    }
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
        Codechef cf = new Codechef();
        cf.Solve();
	}
	
	
	public void Solve(){
        MyScanner sc = new MyScanner();
        int[] arr = new int[3];
        for (int i = 0; i < 3; ++i){
            arr[i] = sc.nextInt();
        }
        Arrays.sort(arr);
        int best = 0;
        for (int i = 0; i < 3; ++i){
            int k = arr[i] % 3;
            for (int j = 0; j <= k; ++j){
                int t = 0;
                boolean ok = true;
                for (int z = 0; z < 3; ++z){
                    if (arr[z] < j){
                        ok = false;
                        break;
                    }
                    int num = (arr[z] - j) / 3;
                    t += num;
                }
                if (!ok) continue;
                t += j;
                // System.out.println(i + " " + j + " " + t);
                best = Math.max(best, t);
            }
        }
        
        out = new PrintWriter(new BufferedOutputStream(System.out));
        out.println(best);
        out.close();
	}
	
	public void DFS(int cur, boolean[] vis,ArrayList<ArrayList<Integer>> con, int[] a, int d, int root, long[] f){
	    f[cur] = 1L;
	    vis[cur] = true;
	    ArrayList<Integer> co = con.get(cur);
	    for (int i = 0; i < co.size(); ++i){
	        int u = co.get(i);
	        if (vis[u]) continue;
	        int j = a[u];
	        if ((j < a[root]) || (j > d + a[root])) continue;
	        if ((j == a[root]) && (u < root)) continue;
	        DFS(u, vis, con, a, d, root, f);
	        f[cur] = (f[cur] * (f[u] + 1)) % MOD;
	    }
	}
	

	//-----------PrintWriter for faster output---------------------------------
   public static PrintWriter out;
      
   //-----------MyScanner class for faster input----------
   public static class MyScanner {
      BufferedReader br;
      StringTokenizer st;
 
      public MyScanner() {
         br = new BufferedReader(new InputStreamReader(System.in));
      }
 
      String next() {
          while (st == null || !st.hasMoreElements()) {
              try {
                  st = new StringTokenizer(br.readLine());
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
          return st.nextToken();
      }
 
      int nextInt() {
          return Integer.parseInt(next());
      }
 
      long nextLong() {
          return Long.parseLong(next());
      }
 
      double nextDouble() {
          return Double.parseDouble(next());
      }
 
      String nextLine(){
          String str = "";
      try {
         str = br.readLine();
      } catch (IOException e) {
         e.printStackTrace();
      }
      return str;
      }

   }
}