#include<bits/stdc++.h>
using namespace std;
int main(){
int n,b=1,a;
cin>>n;
while(b<=n){
a=b;
if(a%10==1||a%10==3||a%10==5||a%10==7){
cout<<b<<endl;
}
b++;
}
/**************************************************************
Problem: 1698
User: tonghuawei
Language: C
Result: Compile Error
****************************************************************/