#include <bits/stdc++.h> 
using namespace std;
int main(){
	int i=1,z;
	cin>>z;
	while(i<=z){
		if(i%10==1||i%10==3||i%10==5||i%10==7){
			cout<<i<<endl;	
		}
		i++;
	}
	
}
/**************************************************************
	Problem: 1698
	User: sucongyi
	Language: C++
	Result: Accepted
	Time:15 ms
	Memory:2072 kb
****************************************************************/