Ballpoint pen that can be expanded or contracted