{"raw_statement":[{"iden":"problem statement","content":"There are infinitely many cards, numbered $1$, $2$, $3$, $...$ Initially, Cards $x_1$, $x_2$, $...$, $x_N$ are face up, and the others are face down.\nSnuke can perform the following operation repeatedly:\n\n*   Select a prime $p$ greater than or equal to $3$. Then, select $p$ consecutive cards and flip all of them.\n\nSnuke's objective is to have all the cards face down. Find the minimum number of operations required to achieve the objective."},{"iden":"constraints","content":"*   $1 ≤ N ≤ 100$\n*   $1 ≤ x_1 < x_2 < ... < x_N ≤ 10^7$"},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$x_1$ $x_2$ $...$ $x_N$"},{"iden":"sample input 1","content":"2\n4 5"},{"iden":"sample output 1","content":"2\n\nBelow is one way to achieve the objective in two operations:\n\n*   Select $p = 5$ and flip Cards $1$, $2$, $3$, $4$ and $5$.\n*   Select $p = 3$ and flip Cards $1$, $2$ and $3$."},{"iden":"sample input 2","content":"9\n1 2 3 4 5 6 7 8 9"},{"iden":"sample output 2","content":"3\n\nBelow is one way to achieve the objective in three operations:\n\n*   Select $p = 3$ and flip Cards $1$, $2$ and $3$.\n*   Select $p = 3$ and flip Cards $4$, $5$ and $6$.\n*   Select $p = 3$ and flip Cards $7$, $8$ and $9$."},{"iden":"sample input 3","content":"2\n1 10000000"},{"iden":"sample output 3","content":"4"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}