def main19():
    strbuf = input("");
    strbufs = strbuf.split();
    buf = [];
    for i in range(2):
        buf.append(int(strbufs[i]));
    result = buf[1] * 6;
    print(result);



if __name__ == '__main__':
    main19()