Let$ p$ be an odd prime number. Determine the number of tuples $(a_1, a_2, . . . , a_p)$ of natural numbers with the following properties: 1) $1 \le ai \le p$ for all $i = 1, . . . , p$. 2) $a_1 + a_2 + · · · + a_p$ is not divisible by $p$. 3) $a_1a_2 + a_2a_3 + . . . +a_{p-1}a_p + a_pa_1$ is divisible by $p$.