A dynamic monetary model with costly foreign currency