The Riemann-Hurwitz Formula for Regular Graphs