import math


def conv_out_size_same(size, stride):
    """This function calculates the output size of a convolutional layer.

    Args:
        size: Input size to the convolutional layer.
        stride: Stride of the convolution filter.

    Returns:
        Convolutional layer output size.
    """
    return int(math.ceil(float(size) / float(stride)))