A taxi ride costs P40.00 for the first 500 meters, and each additional 300 meters (or a

fraction thereof) adds P3.50 to the fare. Use a piecewise function to represent the taxi fare
in terms of the distance d in meters.

f(d) =

{40 for d<=500
{40 + 3.50⌈(d-500)/300⌉ for d>500