def readinput():
    s=list(input())
    return s

def main(s):
    n=len(s)
    count=0
    for i in range(n):
        if s[i]=='1':
            count+=1
    return min(count,n-count)*2

if __name__=='__main__':
    s=readinput()
    ans=main(s)
    print(ans) def readinput():
    s=list(input())
    return s readinput s=list(input()) s list(input()) list input() input return s s def main(s):
    n=len(s)
    count=0
    for i in range(n):
        if s[i]=='1':
            count+=1
    return min(count,n-count)*2 main n=len(s) n len(s) len s count=0 count 0 for i in range(n):
        if s[i]=='1':
            count+=1
     i range(n) range n if s[i]=='1':
            count+=1
     s[i]=='1' s[i] s i '1' count+=1 count 1 return min(count,n-count)*2 min(count,n-count)*2 min(count,n-count) min count n-count n count 2 s s if __name__=='__main__':
    s=readinput()
    ans=main(s)
    print(ans) __name__=='__main__' __name__ '__main__' s=readinput() s readinput() readinput ans=main(s) ans main(s) main s print(ans) print ans s=readinput() readinput() s def main(s):
    n=len(s)
    count=0
    for i in range(n):
        if s[i]=='1':
            count+=1
    return min(count,n-count)*2 def main(s):
    n=len(s)
    count=0
    for i in range(n):
        if s[i]=='1':
            count+=1
    return min(count,n-count)*2 main def readinput():
    s=list(input())
    return s def readinput():
    s=list(input())
    return s readinput ans=main(s) main(s) ans
def readinput():
    s=list(input())
    return s

def main(s):
    n=len(s)
    count=0
    for i in range(n):
        if s[i]=='1':
            count+=1
    return min(count,n-count)*2

if __name__=='__main__':
    s=readinput()
    ans=main(s)
    print(ans)
