Mrs. Letting brought 40 cookies to school. Mrs. Letting's class ate 1/2 of the cookies and Mrs. Kim's class ate 1/4 of the cookies. How many cookies are left?