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


    public class Main {






        public static void main (String[]args) throws IOException {
                Scanner in = new Scanner(System.in);


                try (PrintWriter or = new PrintWriter(System.out)) {

            int r=in.nextInt();
            int b=in.nextInt();
            int g = in.nextInt();
            int l=0;
            long ans=0;
                    if(r>0 && g >0&& b>0) l = 1;
                    ans = r/3 + g/3 + b/3;
                    r %= 3;
                    g %= 3;
                    b %= 3;
                    
                    if(((r == 2 && g == 2 && b == 0) || (r == 2 && b == 2 && g == 0) || (g == 2 && b == 2 && r == 0)) && l>0){
                        or.println(ans+1);
                        return;
                    }
                    while(r>0 && g>0 && b>0){
                        r--;
                        g--;
                        b--;
                        ans++;
                    }
                    or.println(ans);







                }
            }



        static long gcd(long a, long b)
        {
            if (b == 0)
                return a;
            return gcd(b, a % b);
        }
        static int getlen(int r,int l,int a){
            return (r-l+1+1)/(a+1);
        }






        static class Scanner {

            StringTokenizer st;
            BufferedReader br;

            public Scanner(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();
            }

        }
    }

    class Pair implements Comparable<Pair> {
        int first, second;

        public Pair(int first, int second) {
            this.first = first;
            this.second = second;
        }


        @Override
        public int compareTo(Pair o) {
            if (first!=o.first)return first-o.first;
            return second-o.second;
        }
    }

    class Tempo {

       int first,second,third;

        public Tempo(int first, int second, int third) {
            this.first = first;
            this.second = second;
            this.third = third;
        }
    }