int n;
cout << "enter a positive number: ";
cin >> n;
if(n < 0 or n == 0)
{
cout << "invalid input, enter again: ";
cin >> n;
}
n += 1023;
for(int i = 0; ++i < n;)
{
n = n + 321;
n *= i;
++n = i + (n%100);
--n;n++;
i++;
i - 1;
if (n == 7 or i == 3)
{
n++;
}
}
cout << n;