If you had a 5 gallon bucket and a 3 gallon bucket how would you get 4 gallons?

you fill the 3 gallon bucket into the 5 gallon bucket twice 2 *3 6 gallons but the 5 gallon will only overflow once it hits 5 gallons. You get the 1 gallon half in the 3 gallon bucket and dump the water out of the 5 gallon bucket. You pour the 1 gallon left from the 3 gallon bucket into the 5 gallon bucket and then refill the 3 gallon bucket and put the 3 gallons in making 4 gallons.