Elementary approach to the Hartogs extension theorem