On the number line shown, $AE$ = 40 cm, $AD$ = 30 cm, $BE$ = 20 cm, and $C$ is the midpoint of $\overline{BD}$. In centimeters, what is $AC$? [asy] size(8cm);
pair A,B,C,D,E;
A = (0,0);
B = (2,0);
D = (3,0);
E = (4,0);
C = (B+D)/2;
draw((-.5,0)--(4.5,0),Arrows);
dot(A);
dot(B);
dot(C);
dot(D);
dot(E);
label("$A$",A,S);
label("$B$",B,S);
label("$C$",C,S);
label("$D$",D,S);
label("$E$",E,S);
[/asy]
We have $AB+BD=30\text{ cm}$, $BD+DE=20\text{ cm}$, and $AB+BD+DE=40\text{ cm}$.  Summing the first two equations and subtracting the third gives $BD=30\text{ cm}+20\text{ cm}-40\text{ cm}=10$ cm.  Therefore, $BC=BD/2=5\text{ cm}$, $AB=AD-BD=20\text{ cm}$, and $AC=AB+BC=5\text{ cm}+20\text{ cm}=25}\text{ cm$.