Grothendieck–Ogg–Shafarevich formula