inter = input() inter_l = len(inter)-1 count=0 while inter_l >0: if int(inter[inter_l])%3==0: count = count+1 inter_l=inter_l-1 if count