G3.4 Given that $f(x)=\left\{\begin{array}{l}-2 x+1 \text {, when } x<1 \\ x^{2}-2 x \text {, when } x \geq 1\end{array}\right.$. If $d$ is the maximum integral solution of $f(x)=3$, find the value of $d$.
When $x \geq 1, f(x)=3 \Rightarrow x^{2}-2 x=3 \Rightarrow x^{2}-2 x-3=0 \Rightarrow x=3$ or -1 (rejected) When $x<1,-2 x+1=3 \Rightarrow 2 x=-2 \Rightarrow x=-1$ $\therefore d=3$