By your logic you need an infinite amount of fuel.

If you define X the amount of fuel you need after you land.

And you say that X needs to be enough to make an emergency landing.

And we define that the amount of fuel required for an emergency landing should cover the amount required for the landing operation while still having X in the tank when landed.

X > X + landing_cost

The plane already had made 3 failed attempt before and was redirected to two different airports.