GAUSS7 2021 Problem 18

In the diagram, \triangle A B C is isosceles. M is on B C so that B M=M C. If the perimeter of \triangle A B C is 64 and the perimeter of \triangle A B M is 40, what is the length of A M?

Image

Answer Choices
A. 10
B. 8
C. 16
D. 12
E. 24