import math


def get_conv_output_sizes(lengths, num_layers=4):
    """ 
    Returns the length of the output after conv block.
    Using kernel size of 3 for conv1d and maxpool1d, and max pool stride of 2.
    """
    
    kernel_size = 3
    max_pool_stride = 2

    for _ in range(num_layers):
        lengths = [math.floor(((length - (kernel_size-1)) - (kernel_size) + max_pool_stride)/max_pool_stride) for length in lengths]
    return lengths