The mean field approximation for a model with competing interactions