Given a trapezoid ABCDABCDABCD and a point MMM on the side ABABAB such that DM⊥ABDM \perp ABDM⊥AB. It is found that MC=CDMC = CDMC=CD. Find the length of the upper base BCBCBC, if AD=dAD = dAD=d.