Загрузка данных
a = input() b = a.find('f') if b == -1: print(-2) else: c = a.find('f', b + 1) if c == -1: print(-1) else: print(c)