#include #include #include #include #include #include #include // A function to print all prime factors of a given number n long A[1000001]; int j; bool jer; bool car; bool rest; void primeFactors(long long n) { j=0; while (n%2 == 0) { A[j]=2; j++; // printf("%d ", 2); n = n/2; } if(n==1) jer=true; // n must be odd at this point. So we can skip // one element (Note i = i +2) bool car=false; rest=false; bool st=true; for (int i = 3; i <= sqrt(n); i = i+2) { // While i divides n, print i and divide while (n%i == 0) { A[j++]=i; // printf("%d ", i); n = n/i; car=true; } if(car==true && n!=1) st=false; if(car==true && n==1 && st!=false ) rest=true; // if(n==1) car } // This condition is to handle the case when n // is a prime number greater than 2 // printf ("%d ", n); } /* Driver program to test above function */ int main() { int n; scanf("%d", &n); long long a[101]; long long total=0; for (int a_i = 0; a_i < n; a_i++) { scanf("%lld",&a[a_i]); } for(int i=0;i0 ) total--; // printf("%d",ss); } printf("%lld",total); return 0; }