#include<iostream>
#include<algorithm>
#include<cmath>
#include<string>
#include<cstdio>
#include<climits>
using namespace std;
bool check(int x){
while(x){
int temp=x%10;
x/=10;
if(temp==2 ||temp==0 || temp==1 ||temp==9) return true;
}
return false;
}
int main(){
int n;
cin>>n;
int res=0;
for(int i=1;i<=n;i++){
if(check(i)) res+=i;
}
cout<<res;
}
0 回复
0 转发
0 喜欢
0 阅读



