#include int main() { int q,m,t,c=0,tmp; freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); scanf("%d%d%d", &q, &m, &t); //medios c+=(m/2); m=(m%2); //tres q con un q while(t && q) { c++;t--;q--; } c+=t; if(m && q==1) { c++;q--; } if(m && q>1) { c++;q-=2; } c+=(q/4); if( q%4 != 0 ) c++; printf("%d", c); fclose(stdin); fclose(stdout); return 0; }