#ECE 2524 Homework 3 Problem 2 Glen Polo

import argparse
import sys
import fileinput



mult = 1
initial = 1

parser = argparse.ArgumentParser(description='Multiply these integers dude!')
parser.add_argument("File",nargs = '*')
parser.add_argument('--ignore-blank', dest='ignore_blank', action = 'store_true')
parser.add_argument('--ignore-non-numeric', dest = 'ignore_non_numeric', action = 'store_true')
args = parser.parse_args()
#print(args)



	
	#files = sys.argv[1:]
for line in fileinput.input(args.File):
	if line == '\n':
		print(str(mult))
		mult = initial
	else :
   		try:
       			mult = mult * int(line)
    		except ValueError:
			if not args.ignore_blank:
				sys.stderr.write("input is not a valid input, must be a real number \n")
				sys.exit(1)
			else:
				pass
			#print >> sys.stderr ("hmmm")
        	
	
print( str(mult))
	#print(files)

sys.exit()
#print (args)
