#include using namespace std; int main(){ int G,C,P; cin>>G>>C>>P; int n=G+C+P; int point=0; for(int i=0; i>a; if(a=='G'){ if(P>0){ P--;point+=3;continue;} else if(G>0){ G--;point+=1;continue;} } else if(a=='C'){ if(G>0){ G--;point+=3;continue;} else if(C>0){ C--;point+=1;continue;} } else if(a=='P'){ if(C>0){ C--;point+=3;continue;} else if(P>0){ P--;point+=1;continue;} } cout<