Update main.py for py 2.7 compatibility

I fixed a little bug for python 2.7.
num_dashes/periods contained floats, which lead to a 'string' * float(x)  scenario which isn't good, is it ?
So i parsed them to ints.