import tables let S = stdin.readLine var dic = initCountTable[char]() for c in S: dic.inc(c) echo [dic['t'], dic['r'], dic['e'] div 2].min