A CNN Approach to Automated Detection and Classification of Brain Tumors