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 javax.swing.*;
import java.io.*;
import java.util.*;


public class Main {
    static PrintWriter out=new PrintWriter(System.out);

    public static void main(String[] args) throws IOException {
        //BufferedReader reader=new BufferedReader(new FileReader("input.txt"));
        //PrintWriter pw=new PrintWriter(new BufferedWriter(new FileWriter("output.txt")));
        //BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        //Scanner scanner=new Scanner(System.in);
        Reader in = new Reader();

        int x=in.nextInt();
        int y=in.nextInt();
        int z=in.nextInt();
        int[] a=new int[3];
        for (int i = 0; i <=2 ; i++) {
            int r=x;
            int g=y;
            int b=z;
            int count=0;
            while (count<i && r!=0 && b!=0 && g!=0){
                r--;
                g--;
                b--;
                count++;
                //System.out.println(-1);
            }
            //System.out.println(r+" "+g+" "+b);
            count+=r/3;
            count+=b/3;
            count+=g/3;
            a[i]=count;
        }//System.out.println(Arrays.toString(a));
        Arrays.sort(a);

        System.out.println(a[2]);








        out.close();

    }
    static long nextLucky(long n){
        char[] s=String.valueOf(n).toCharArray();
        for (int i = s.length-1; i >=0 ; i--) {
            if (s[i]=='4'){
                s[i]='7';
                for (int j = i+1; j <s.length ; j++) {
                    s[j]='4';
                }
                break;
            }
            else if (i==0){
                Arrays.fill(s,'4');
                return Long.parseLong("4"+String.valueOf(s));
            }
        }
        return Long.parseLong(String.valueOf(s));
    }
    static boolean isLucky(long n){
        char[] s=String.valueOf(n).toCharArray();
        int four=0,seven=0;
        for (int i = 0; i <s.length ; i++) {
            if (s[i]!='4' && s[i]!='7')
                return false;
            if (s[i]=='4')four++;
            if (s[i]=='7')seven++;
        }

        return four==seven;

    }
    static int kadens(int[] a,int x){
        int maxSoFar=0;
        int maxEndHere=0;
        int count=0;
        boolean found=false;
        for (int i = 0; i <a.length ; i++) {
            maxEndHere+=a[i];
            count++;
            if (maxEndHere%x==0){
                maxEndHere=a[i];
                count=1;
            }
            else
                found=true;

            if (maxSoFar<count)
                maxSoFar=count;
        }
        if (found)
            return maxSoFar;
        else
            return -1;
    }
    static int gcd(int a,int b){
        if (b==0)
            return a;
        return gcd(b,a%b);

    }
    static boolean ok(int n){
        if (n%2==0 || n%3==0 || n%5==0)
            return true;
        else
            return false;
    }




    static int find(int n,int[] p){
        if (p[n]==n)return n;
        return p[n]=find(p[n],p);
    }
    static void union(int a,int b,int[] p,int[] level){
        int aRoot=find(a,p);
        int bRoot=find(b,p);
        if (aRoot==bRoot)return;
        p[bRoot]=aRoot;
        level[aRoot]+=level[bRoot];
    }
}
class node implements Comparable<node>{
    Integer no;
    Integer cost;
    Vector<node> adj=new Vector<>();
    public node(Integer no, Integer cost) {
        this.no = no;
        this.cost = cost;
    }

    @Override
    public String toString() {
        return "node{" +
                "no=" + no +
                ", cost=" + cost +
                '}';
    }

    @Override
    public int compareTo(node o) {
        return o.cost-this.cost;
    }
}
class edge implements Comparable<edge>{
    tuple u;
    Double cost;
    public edge(tuple u, Double cost) {
        this.u = u;
        this.cost = cost;
    }
    @Override
    public int compareTo(edge o) {
        return this.cost.compareTo(o.cost);
    }

    @Override
    public String toString() {
        return "edge{" +
                "u=" + u +
                ", cost=" + cost +
                '}';
    }
}
///*
class tuple implements Comparable<tuple>{
    int a;
    int b;
    tuple(int a, int b) {
        this.a = a;
        this.b = b;
    }

    @Override
    public int compareTo(tuple o) {
        return (this.a-o.a);
    }

    @Override
    public String toString() {
        return "tuple{" +
                "a=" + a +
                ", b=" + b +
                '}';
    }
}

//*/
class Reader {
    final private int BUFFER_SIZE = 1 << 16;
    private DataInputStream din;
    private byte[] buffer;
    private int bufferPointer, bytesRead;

    public Reader() {
        din = new DataInputStream(System.in);
        buffer = new byte[BUFFER_SIZE];
        bufferPointer = bytesRead = 0;
    }

    public Reader(String file_name) throws IOException {
        din = new DataInputStream(new FileInputStream(file_name));
        buffer = new byte[BUFFER_SIZE];
        bufferPointer = bytesRead = 0;
    }

    public String readLine() throws IOException {
        byte[] buf = new byte[64];
        int cnt = 0, c;
        while ((c = read()) != -1) {
            if (c == '\n') break;
            buf[cnt++] = (byte) c;
        }
        return new String(buf, 0, cnt);
    }

    public int nextInt() throws IOException {
        int ret = 0;
        byte c = read();
        while (c <= ' ') c = read();
        boolean neg = (c == '-');
        if (neg) c = read();
        do {
            ret = ret * 10 + c - '0';
        } while ((c = read()) >= '0' && c <= '9');
        if (neg) return -ret;
        return ret;
    }

    public long nextLong() throws IOException {
        long ret = 0;
        byte c = read();
        while (c <= ' ') c = read();
        boolean neg = (c == '-');
        if (neg) c = read();
        do {
            ret = ret * 10 + c - '0';
        } while ((c = read()) >= '0' && c <= '9');
        if (neg) return -ret;
        return ret;
    }

    public double nextDouble() throws IOException {
        double ret = 0, div = 1;
        byte c = read();
        while (c <= ' ') c = read();
        boolean neg = (c == '-');
        if (neg) c = read();
        do {
            ret = ret * 10 + c - '0';
        } while ((c = read()) >= '0' && c <= '9');
        if (c == '.') while ((c = read()) >= '0' && c <= '9') ret += (c - '0') / (div *= 10);
        if (neg) return -ret;
        return ret;
    }

    private void fillBuffer() throws IOException {
        bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
        if (bytesRead == -1) buffer[0] = -1;
    }

    private byte read() throws IOException {
        if (bufferPointer == bytesRead) fillBuffer();
        return buffer[bufferPointer++];
    }

    public void close() throws IOException {
        if (din == null) return;
        din.close();
    }
}