/*#牛客春招刷题训练营# https://www.nowcoder.com/discuss/726480854079250432*/
#include <iostream>//----------本来只是想先暴力再打表的结果暴力过了,实际上自测用5e5会超时
using namespace std;
int main() {
int n, i = 5, ans = 0;
cin >> n;
if (n > 1000){
i = 1001;
ans = 3;
}
for (; i <= n; i++){
int temp = 0;
for (int j = 1; j < i; j++){
if (i % j == 0)
temp += j;
}
if (temp == i)
ans++;
}
cout << ans;
}

京公网安备 11010502036488号