calculate offset of first partition