Calculating pi by Vieta's product

$MinPrecision = 20;

VietaProd[nStep_] := 
Module[{i,prod,cosine},
For[i = 0; prod = 1; cosine = 0,
i < nStep,
i++,
cosine = Sqrt[(1+cosine)/2];
prod *= cosine;
If[i<3,Print[prod]];
];
Return[(2/prod)//N]
]

VietaProd[50]

Pi//N