#include <iostream>
size_t suma_cifre(int n) {
size_t c = 0;
if (n < 0)
n = -n;
while (n) {
c += n % 10;
n /= 10;
}
return c;
}
int main() {
int m, n;
std::cin >> m >> n;
while (m <= n) {
if (!(suma_cifre(m) % 5))
std::cout << m << ' ';
++m;
}
}