fork download
  1. while True:
  2. registros = raw_input()
  3. if registros[0] == '-':
  4. break
  5. i = 0
  6. faltas = 0
  7. while i < len(registros):
  8. if registros[i] == 'f':
  9. faltas += 1
  10. i += 1
  11. print faltas
  12.  
  13. #https://pt.stackoverflow.com/q/349204/101
Success #stdin #stdout 0s 23296KB
stdin
.f.f.f.f
.f.f..
-
stdout
4
2