You can stay for as long as your visa is valid if you are still studying. You can request for an extension if your course is ending after your visa expiry date.