def main():
    s = list(map(int, list(input())))

    c0 = 0
    c1 = 0

    for x in s:
        if x == 1:
            c1 += 1
        else:
            c0 += 1

    print(2*min(c0, c1))

if __name__ == '__main__':
    main() def main():
    s = list(map(int, list(input())))

    c0 = 0
    c1 = 0

    for x in s:
        if x == 1:
            c1 += 1
        else:
            c0 += 1

    print(2*min(c0, c1)) main s = list(map(int, list(input()))) s list(map(int, list(input()))) list map(int, list(input())) map int list(input()) list input() input c0 = 0 c0 0 c1 = 0 c1 0 for x in s:
        if x == 1:
            c1 += 1
        else:
            c0 += 1

     x s if x == 1:
            c1 += 1
        else:
            c0 += 1

     x == 1 x 1 c1 += 1 c1 1 c0 += 1 c0 1 print(2*min(c0, c1)) print 2*min(c0, c1) 2 min(c0, c1) min c0 c1 if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    s = list(map(int, list(input())))

    c0 = 0
    c1 = 0

    for x in s:
        if x == 1:
            c1 += 1
        else:
            c0 += 1

    print(2*min(c0, c1)) def main():
    s = list(map(int, list(input())))

    c0 = 0
    c1 = 0

    for x in s:
        if x == 1:
            c1 += 1
        else:
            c0 += 1

    print(2*min(c0, c1)) main
def main():
    s = list(map(int, list(input())))

    c0 = 0
    c1 = 0

    for x in s:
        if x == 1:
            c1 += 1
        else:
            c0 += 1

    print(2*min(c0, c1))

if __name__ == '__main__':
    main()