Suppose an integer \(n\) has \(k\) digits and let \(a_k\) be the \(k\)th digit. We can represent \(n\) like this:
$$n = a_k 10^{k-1} + a_{k-1} 10^{k-2} + \ldots + a_3 10^2 + a_2 10^1 +a_1 $$
Since 10 is divisible by 2, then \((a_k 10^{k-1} + \ldots + a_2 10^1)\) is also divisible by 2. So if we divide \(n\) by 2, then there exists an integer \(h\) such that:
$$\begin{align} \frac{n}{2} &= \frac{a_k 10^{k-1} + a_{k-1} 10^{k-2} + \ldots + a_2 10^1}{2} + \frac{a_1}{2} \\ \frac{n}{2} &= h + \frac{a_1}{2} \end{align}$$
This means \(\frac{n}{2}\) would be an integer if and only if \(\frac{a_1}{2}\) is an integer.