It is straightforward,
What i have done is give two disjoint sets whose union is the total,
f is constant on each of these two sets. 1 in the first and 0 in the second.
Integrating the constant 1 over any set yields the measure of that set, in your problem that is the lebesgue measure, and since our set is an interval, the lebesgue measure of an interval is the length of such interval. Hence 1 - 0 .
Although the other set has positive lebesgue measure, the fact that f is 0 over it vanishes that part.
Do the same with the other and post your results.