import math


def lenofb64coding(initlen):
    """
    Calculates the length of a Base64 encoded string of data of the initial length initlen
    """

    x = math.ceil(initlen * 4 / 3)
    while x % 3 > 0:
        x += 1
    return x