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.*;
import java.math.BigInteger;
import java.util.*;

import static java.lang.Math.*;
import static java.util.Arrays.fill;


public class Main {
    public static void main(String[] args) throws IOException {
        run();
        end();
    }

    static void run() throws IOException {
        int a = nextInt();
        int b = nextInt();
        int c = nextInt();
        int sum = a + b + c;
        a = min(a, min(b, c));
        c = max(a, max(b, c));
        b = sum - a - c;
        int kB = b % 3;
        int kC = c % 3;
        if (a == 0) {
            out.println(b / 3 + c / 3);
        } else {
            while (a % 3 != kB && a % 3 != kC)
                a--;
            out.println(a + (b - a) / 3 + (c - a) / 3);
        }
    }

    static long stepenb(long a, long b) {
        long h = 1;
        while (b > 0) {
            if (b % 2 != 0) {
                h *= a;
                b--;
            }
            b /= 2;
            a *= a;
        }
        return h;
    }

    static class CLASS {
        long a, cont, delete;
    }

    static long lcm(long a, long b) {
        return a * b / gcd(a, b);
    }

    private static long gcd(long a, long b) {
        return b == 0 ? a : gcd(b, a % b);
    }

    static void end() {
        out.flush();
        out.close();
    }

    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static PrintWriter out = new PrintWriter(System.out);


    static StringTokenizer in = new StringTokenizer("");

    public static String nextToken() throws IOException {
        while (in == null || !in.hasMoreTokens()) {
            String s = br.readLine();
            if (s == null) return null;
            in = new StringTokenizer(s);
        }
        return in.nextToken();
    }


    public static int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    public static double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    public static long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
}