#include<bits/stdc++.h>
using namespace std;
int main(){
	int i=101;
	while(i<=200){
		i++;
		if(i%3==2&&i%5==3&&i%7==5) cout<<i;
	}
}
/**************************************************************
	Problem: 1017
	User: fandaohan
	Language: C++
	Result: Accepted
	Time:4 ms
	Memory:2072 kb
****************************************************************/