A,B,C,D,E=map(int,input().split()) T=(A+B)*(C+D) time=[0]*T for t in range(T): if t%(A+B)