#include<iostream> using namespace std; int main(){ int z=1E8; for(;z>=1;--z){ if(z%105==0){ cout<<z; break; } } return 0; }