import java.util.*; import java.math.*; public class pre { public static void main(String[] args) { Scanner s = new Scanner(System.in); String str = s.next(); int t=0,r=0,e=0; for(int i=0; i0 || r>0 || e>1){ t--; r--; e-=2; count++; } System.out.println(count); } }