s,m,t,u,f,d:longint;
ch:char;
begin
readln(t,m,u,f,d);s:=0;
while t>0 do begin
readln(ch);
if ch='f' then t:=t-f-f
else t:=t-u-d;
inc(s);end;
write(s-1);
end.
快速帮助 | 运行状态 | 反馈举报 | 关于我们 | 免责声明 | 浙ICP备11060257号 Processed in 0.0045 Second(s) Copyright (C) RQNOJ 2007-2019. All Rights Reserved.