#include int main(void){ int i; int N; int powerUpCount = 0; int itemNum[12]; int rest = 0; scanf("%d", &N); for(i=0;i<12;i++){itemNum[i] = 0;} for(i=0;i=2){ itemNum[A]-=2; powerUpCount +=1;} itemNum[B] += 1; if(itemNum[B]>=2){ itemNum[B]-=2; powerUpCount +=1;} itemNum[C] += 1; if(itemNum[C]>=2){ itemNum[C]-=2; powerUpCount +=1;} } for(i=0;i<12;i++){ rest += itemNum[i]; } powerUpCount += (rest/4); printf("%d\n", powerUpCount); return 0; }