In this paper, we propose a cost effective mutual authentication scheme with key agreement using smart cards. Our scheme is motivated by the scheme design in two articles published recently: Lee et al.'s `Efficient nonce-based remote user authentication scheme using smart cards' and Chen and Yeh's `An efficient nonce-based authentication scheme with key agreement.' Both designs are nonce-based and intended to achieve mutual authentication using smart cards. However, the former is extremely efficient but not secure, whereas the latter is secure but includes unnecessary extra operations. Besides, although not explicitly mentioned, the key agreement function can easily be added into Lee et al.'s scheme in a way similar to that of Chen and Yeh's scheme. The major contribution of our work is to combine the advantages of the above two schemes without their weakness.