fork download
  1. var st :string;
  2. k, i :integer;
  3. begin
  4. read (st);
  5. for i := 1 to length (st) do begin
  6. if st[i] = '0' then k := k + 1;
  7. if st[i] = '6' then k := k + 1;
  8. if st[i] = '8' then k := k + 2;
  9. if st[i] = '9' then k := k + 1;
  10. end;
  11. write (k);
  12. end.
Success #stdin #stdout 0s 9128KB
stdin
157892
stdout
3