Also, I suspect the formula you intend is X + max(UBI - X, 0)—or, more simply max(UBI, X). Consider what your formula does for pension < UBI.