#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define all(v) v.begin(), v.end()
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define repr(i, n) for (ll i = (n-1); i >= 0; i--)
#define Rep(n) for (ll _ = 0; _ < (ll)(n); _++)

template <class S>S sum(vector<S>& a) {return accumulate(all(a), S());}
template <class S>S max(vector<S>& a) {return *max_element(all(a));}
template <class S>S min(vector<S>& a) {return *min_element(all(a));}
ll max(int a, ll b) { return max((ll)a, b); } ll max(ll a, int b) { return max(a, (ll)b); }
ll min(int a, ll b) { return min((ll)a, b); } ll min(ll a, int b) { return min(a, (ll)b); }

void Main();
int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(20);
  Main();
  return 0;
}

void Main(){
  int k; cin >> k;
  ll ans = 0;
  for(int a=1; a <= k; a++){
    for(int b = 1; b <= k; b++){
      if(a * b > k){
        break;
      }
      ans += (ll)k / (a * b);
    }
  }
  cout << ans << endl;
}

/*
少加头文件，爆零两行泪
DP后效性，爆零两行泪
文件读入错，爆零两行泪
文件名写错，爆零两行泪
调完不编译，爆零两行泪
结论不证明，爆零两行泪
数组没开够，爆零两行泪
ll开 int，爆零两行泪
 dp 没初值，爆零两行泪
深搜没边界，爆零两行泪
广搜忘出队，爆零两行泪
模数没看清，爆零两行泪
越界不特判，爆零两行泪
多测不清空，爆零两行泪
空间胡乱开，爆零两行泪
无向变有向，爆零两行泪
调试忘删除，爆零两行泪
文件不保存，爆零两行泪
题目提交错，爆零两行泪
*/
#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#define ll long long
#define gmax(x,y) x=max(x,y)
#define gmin(x,y) x=min(x,y)
#define F first
#define S second
#define P pair
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define rep(i,a,b) for(int i=a;i<b;i++)
#define V vector
#define RE return
#define ALL(a) a.begin(),a.end()
#define MP make_pair
#define PB emplace_back
#define PF emplace_front
#define FILL(a,b) memset(a,b,sizeof(a))
#define lwb lower_bound
#define upb upper_bound
using namespace std;
P<int,int> p[20000005]; 
int a[2005],cnt;
signed main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	int n,mini=1e9;
	cin>>n;
	FOR(i,1,n){
		cin>>a[i];
		gmin(mini,a[i]);
		for(int j=1;j*j<=a[i];j++){
			if(a[i]%j==0){
				p[++cnt]=MP(j,i);
				if(j*j!=a[i])p[++cnt]=MP(a[i]/j,i);
			}
		} 
	}
	sort(p+1,p+cnt+1);
	int GCD=a[p[1].S],ans=0;
	FOR(i,2,cnt){
		if(p[i].F!=p[i-1].F){
//			cout<<p[i-1].F<<' '<<GCD<<'\n';
			if(GCD==p[i-1].F)ans++;
			GCD=a[p[i].S];
		}else{
			GCD=__gcd(GCD,a[p[i].S]);
		}
		if(p[i].F>mini)break;
	}
	if(GCD<=mini&&GCD==p[cnt].F)ans++;
	cout<<ans;
	RE 0;
}




