制約がゆるめだともうすこし楽しそう (esolangerの感想)

#!/usr/bin/env python3
s = input()
t = s.count('t')
r = s.count('r')
e = s.count('e')
print(min(t, r, e//2))