from operator import mul
from functools import reduce

def answer():
    
    indices = [10 ** i for i in range(7)]
    
    n = 2 # start with using 2 numbers
    constant = "01" # two numbers, 0,1
    while indices[-1] >= len(constant):
         n *= 2
         constant = "".join(str(i) for i in range(n))
         
    return reduce(mul, (int(constant[i]) for i in indices))
    
if __name__ == '__main__':
    print(answer())
