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.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.StringTokenizer;

public class CF {

    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        int[] arr = new int[] { in.nextInt(), in.nextInt(), in.nextInt() };
        Arrays.sort(arr);

        int res = getMax(arr);
        if (arr[0] > 0) {
            res = Math.max(res, 1 + getMax(new int[] { arr[0] - 1, arr[1] - 1, arr[2] - 1 }));
        }
        if (arr[0] > 1) {
            res = Math.max(res, 2 + getMax(new int[] { arr[0] - 2, arr[1] - 2, arr[2] - 2 }));
        }
        
        out.println(res);
        out.close();
    }

    public static int getMax(int[] initArr) {
        int[] arr = new int[] { initArr[0], initArr[1], initArr[2] };

        int res = 3 * (arr[0] / 3);
        int tempRes = 0;
        int initRes = 3 * (arr[0] / 3);
        arr[1] -= 3 * (arr[0] / 3);
        arr[2] -= 3 * (arr[0] / 3);
        arr[0] -= 3 * (arr[0] / 3);

        tempRes = initRes + arr[1] / 3 + arr[2] / 3;
        res = Math.max(res, tempRes);

        if (arr[0] >= 1) {
            tempRes = initRes + 1 + (arr[1] - 1) / 3 + (arr[2] - 1) / 3;
            res = Math.max(res, tempRes);
        }

        if (arr[0] >= 2) {
            tempRes = initRes + 2 + (arr[1] - 2) / 3 + (arr[2] - 2) / 3;
            res = Math.max(res, tempRes);
        }

        return res;
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public long nextLong() {
        return Long.parseLong(next());
    }
}