Press the flag and answer "yes" or "no depending on what number he says. It may take a while for him to guess your number.
I used my teacher's help to make this.