// Compound Logic 3
// Print all numbers from 1 to 100 which are
// divisible by (3 or 7) and divisible by 5

#include<iostream>
using namespace std;

int main()
{
    for(int i = 1; i <= 100; i++)
	{
		if( (i % 3 == 0 || i % 7 == 0) && (i % 5 == 0) )
		{
            cout << i << endl;
		}
	}

    return 0;
}
