#include <iostream>
using namespace std;
const int MAX_SIZE = 100;
const int TEN = 10;
int isPrime(int digit) {
if (digit == 2 || digit == 3 || digit == 5 || digit == 7) {
return 1;
}
return 0;
}
int countPrimeDigits(int num) {
int totalPrimeDigits = 0;
while (num) {
totalPrimeDigits += isPrime(num % TEN);
num /= TEN;
}
return totalPrimeDigits;
}
int main() {
int n, lowestErrorPos = 0, maxPrimeDigits = 0;
cin >> n;
for (int i = 1; i <= n; ++i) {
int num;
cin >> num;
if (maxPrimeDigits < countPrimeDigits(num)) {
maxPrimeDigits = countPrimeDigits(num);
lowestErrorPos = i;
}
}
if (lowestErrorPos) {
cout << lowestErrorPos;
} else {
cout << "AJUNGE LA DESTINATIE!";
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY29uc3QgaW50IE1BWF9TSVpFID0gMTAwOwpjb25zdCBpbnQgVEVOID0gMTA7CgppbnQgaXNQcmltZShpbnQgZGlnaXQpIHsKCWlmIChkaWdpdCA9PSAyIHx8IGRpZ2l0ID09IDMgfHwgZGlnaXQgPT0gNSB8fCBkaWdpdCA9PSA3KSB7CgkJcmV0dXJuIDE7Cgl9CglyZXR1cm4gMDsKfQoKaW50IGNvdW50UHJpbWVEaWdpdHMoaW50IG51bSkgewoJaW50IHRvdGFsUHJpbWVEaWdpdHMgPSAwOwoJd2hpbGUgKG51bSkgewoJCXRvdGFsUHJpbWVEaWdpdHMgKz0gaXNQcmltZShudW0gJSBURU4pOwoJCW51bSAvPSBURU47Cgl9CglyZXR1cm4gdG90YWxQcmltZURpZ2l0czsKfQoKaW50IG1haW4oKSB7CiAgICBpbnQgbiwgbG93ZXN0RXJyb3JQb3MgPSAwLCBtYXhQcmltZURpZ2l0cyA9IDA7CiAgICBjaW4gPj4gbjsKICAgIGZvciAoaW50IGkgPSAxOyBpIDw9IG47ICsraSkgewogICAgICAgIGludCBudW07CiAgICAgICAgY2luID4+IG51bTsKICAgICAgICBpZiAobWF4UHJpbWVEaWdpdHMgPCBjb3VudFByaW1lRGlnaXRzKG51bSkpIHsKICAgICAgICAgICAgbWF4UHJpbWVEaWdpdHMgPSBjb3VudFByaW1lRGlnaXRzKG51bSk7CiAgICAgICAgICAgIGxvd2VzdEVycm9yUG9zID0gaTsKICAgICAgICB9IAogICAgfQogICAgCiAgICBpZiAobG93ZXN0RXJyb3JQb3MpIHsKICAgICAgIGNvdXQgPDwgbG93ZXN0RXJyb3JQb3M7IAogICAgfSBlbHNlIHsKICAgICAgICBjb3V0IDw8ICJBSlVOR0UgTEEgREVTVElOQVRJRSEiOwogICAgfQogICAgcmV0dXJuIDA7Cn0=