Step 1: Write mean and standard deviation.
For
\[
X\sim B(n,p),
\]
mean is
\[
\mu=np
\]
and standard deviation is
\[
\sigma=\sqrt{npq},
\]
where
\[
q=1-p.
\]
Given
\[
p=0.3,\qquad q=0.7.
\]
Step 2: Use the given condition.
The mean is three times the standard deviation.
Hence,
\[
np=3\sqrt{npq}.
\]
Substituting \(p=0.3\) and \(q=0.7\),
\[
0.3n
=
3\sqrt{0.21n}.
\]
Step 3: Square both sides.
\[
0.09n^2
=
9(0.21n).
\]
\[
0.09n^2
=
1.89n.
\]
\[
0.09n
=
1.89.
\]
\[
n
=
\frac{1.89}{0.09}.
\]
\[
n=21.
\]
Step 4: Final conclusion.
Therefore,
\[
\boxed{21}
\]