If you want to leave without having bad looks, try to pretend you got a call from someone? I think some first year maths lecturers are pretty tough on people going late to the lecture, probably as bad when you leave before the lecture ends..
I've left lectures before, but only when the lecturer doesn't know me personally
Otherwise it's in your best interest not to leave the lecture at all cost.. heh