#include <iostream>
#include <ctime>

using namespace std;

int main() {
    int i,cont=0;
    clock_t start, end;
    start = clock();

    do {
        scanf("%i", &i);
        printf("%i\n", i);
        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;
}
