#include <bits/stdc++.h>
#define ll long long
using namespace std;
const int N = 500010;
ll prime[N] = {0}, num_prime = 0; //prime存放着小于N的素数
int isNotPrime[N] = {1, 1};       // isNotPrime[i]如果i不是素数，则为1
ll n, cnt;
ll Not[N];

int Prime()
{
    for (ll i = 2; i < N; i++)
    {
        if (!isNotPrime[i])
            prime[num_prime++] = i;
        //无论是否为素数都会下来
        for (ll j = 0; j < num_prime && i * prime[j] < N; j++)
        {
            isNotPrime[i * prime[j]] = 1;
            if (!(i % prime[j])) //遇到i最小的素数因子
                                 //关键处1
                break;
        }
    }
    for (int j = 0; prime[j] * prime[j] <= 1e5; j++)
    {
        ll temp = prime[j] * prime[j];
        while (temp <= 1e5)
        {
            Not[temp] = true;
            temp *= prime[j];
        }
    }
    return 0;
}

long long ifpower(long long _a, long long _b, long long _p = 1e18)
{
    long long _ans = 1;
    while (_b)
    {
        if (_b & 1)
            _ans = (_ans * _a) % _p;
        _a = (_a * _a) % _p;
        _b >>= 1;
    }
    return _ans;
}

int main()
{
    Prime();
    scanf("%lld", &n);
    // for (int i = 2; i <= 10; i++)
    //     printf("%d ", Not[i]);
    cnt = 0;
    for (ll i = 2; i * i <= n; i++)
    {
        if (Not[i])
            continue;
        ll temp = i * i;
        while (temp <= n)
        {
            if(temp<=1e5)
                Not[temp] = true;
            cnt++;
            temp *= i;
        }
    }
    printf("%lld", n - cnt);
    return 0;
}
#include<iostream>
using namespace std;

int main(){
  int N;
  cin>>N;
  int arr[N];
  for(int i=0;i<N;i++){
  	cin>>arr[i];
  }
  
  int sum=0;
  for(int i=0;i<N;i++){
  	if(arr[i]>10) sum+=arr[i]-10;
  }
  
  cout<<sum<<endl;
  	
  return 0;
}