A block slides up a ramp, with gravity and sliding friction…

A block slides up a ramp, with gravity and sliding friction the only forces acting. The ramp is 6 m long parallel to it’s surface, and the top is 3 m from the ground measured vertically (because of the incline angle).  Which distance would you use to calculate the work done by gravity?