He worked it out with a pencil.