#include <bits/stdc++.h>
using namespace std;

vector<long long> primes, X;
long long dp[73][(1<<20)];

int isPrime(int n)
{
    for (int i=2; i*i<=n; i++)
        if (n % i == 0)
            return 0;
    
    return 1;
}

long long solve(int n, int mask)
{
    if (n < 0)
        return 1;
    
    if (dp[n][mask] != -1)
        return dp[n][mask];
    
    int canTake = 1;
    int newMask = mask;
    long long ans = solve(n-1, mask);
    
    for (int i=0; i<primes.size(); i++)
    {
        if (X[n] % primes[i] == 0)
        {
            if (mask & (1 << i))
                canTake = 0;
            
            newMask |= (1 << i);
        }
    }
    
    if (canTake)
        ans += solve(n-1, newMask);
    
    return dp[n][mask ] = ans;
}

int main()
{   
    for (int i=2; i<=71; i++)
        if (isPrime(i))
            primes.push_back(i);
    
    long long a, b;
    cin >> a >> b;
    
    while (a <= b)
        X.push_back(a++);
    
    memset(dp, -1, sizeof(dp));
    
    cout << solve(X.size() - 1, 0) << "\n";
    return 0;
}

#define rep(i, a, b) for (int i = a; i <= b; ++i)
#define rep2(i, a, b) for (int i = a; i < b; ++i)
#define per(i, a, b) for (int i = a; i >= b; --i)

#include <bits/stdc++.h>
using namespace std;

const int MAXN = 2e5 + 5;

void solve() {
    int n, res = 0;
    cin >> n;
    rep (i, 1, n) {
        int x;
        cin >> x;
        res += max(x - 10, 0);
    }
    cout << res << '\n';
}
signed main(int argc, char *argv[]) {
#ifdef ONLINE_JUDGE
    ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#endif
    int cas = 1;
    // cin >> cas;
    while (cas--) solve();
#ifndef ONLINE_JUDGE
    system("pause");
#endif
    return 0;
}