A,B = map(int, input().split()) S = A + 5*B for n in range(1, S+1): if n % 5 <= A: print(n)