#include<iostream> using namespace std; int main(){ int i=1000; while(1){ if(i%3==2&&i%5==4&&i%7==6){ cout<<i; break; } i++; } return 0; }