#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	C
# CreatedDate:  2020-09-11 14:10:37 +0900
# LastModified: 2020-09-11 14:16:43 +0900
#


import os
import sys
# import numpy as np
# import pandas as pd


def main():
    S = input()
    if S.count('0') < S.count('1'):
        print(S.count('0')*2)
    else:
        print(S.count('1')*2)


if __name__ == "__main__":
    main() import os os import sys sys def main():
    S = input()
    if S.count('0') < S.count('1'):
        print(S.count('0')*2)
    else:
        print(S.count('1')*2) main S = input() S input() input if S.count('0') < S.count('1'):
        print(S.count('0')*2)
    else:
        print(S.count('1')*2) S.count('0') < S.count('1') S.count('0') S.count S count '0' S.count('1') S.count S count '1' print(S.count('0')*2) print S.count('0')*2 S.count('0') S.count S count '0' 2 print(S.count('1')*2) print S.count('1')*2 S.count('1') S.count S count '1' 2 if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    S = input()
    if S.count('0') < S.count('1'):
        print(S.count('0')*2)
    else:
        print(S.count('1')*2) def main():
    S = input()
    if S.count('0') < S.count('1'):
        print(S.count('0')*2)
    else:
        print(S.count('1')*2) main
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	C
# CreatedDate:  2020-09-11 14:10:37 +0900
# LastModified: 2020-09-11 14:16:43 +0900
#


import os
import sys
# import numpy as np
# import pandas as pd


def main():
    S = input()
    if S.count('0') < S.count('1'):
        print(S.count('0')*2)
    else:
        print(S.count('1')*2)


if __name__ == "__main__":
    main()
