#include <iostream>
#include <ctime>

using namespace std;

int main() {
    int i,cont=0;
    clock_t start, end;
    start = clock();
    
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);   

    do {
        cin >> i;
        cout << i << '\n';
        if (i % 1237 == 0) {
            cont++;
        }
    } while (cont != 5);
    
    end = clock();
  
    //calcula o tempo de execucao
    double time_taken = double(end - start) / double(CLOCKS_PER_SEC);
    cout << "Tempo: " << time_taken << " sec " << endl;

    return 0;
}
