first in first out method formula