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.InputStreamReader;
import java.util.StringTokenizer;


public class _190_B implements Runnable{
    public static void main(String[] args) {
        new Thread(null, new _190_B(),"Main",1<<27).start();
    }
    @Override
    public void run() {
        FastReader fd = new FastReader();
        long r = fd.nextLong();
        long g = fd.nextLong();
        long b = fd.nextLong();
        if( r < 3 && g < 3 && b < 3){System.out.println(0);return;}

        if(b == g && g == r){System.out.println(r);return;}

        if( r % 3 == 0 && g % 3 == 0 && b % 3 == 0 ){ System.out.println((r+g+b)/3);return; }

        if(r == 0){ System.out.println(g/3+b/3);return; }

        if(g == 0){ System.out.println(r/3+b/3);return; }

        if(b == 0){ System.out.println(r/3+g/3);return; }

        long er = 0,eg = 0,eb = 0;

        if(r%3 != 0){ er = r%3; }
        if(g%3 != 0){ eg = g%3; }
        if(b%3 != 0){ eb = b%3; }

        r -= (er==0)?Math.min(eb,eg):er;
        g -= (eg==0)?Math.min(er,eb):eg;
        b -= (eb==0)?Math.min(er,eg):eb;

        long ext = Math.min(er,Math.min(eg,eb));

        if(er == 0){ ext = Math.min(eb,eg); }
        if(eg == 0){ ext = Math.min(eb,er); }
        if(eb == 0){ ext = Math.min(er,eg); }

        System.out.println((r/3 + g/3 + b/3)+ ext );
    }


    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

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