The problem is about determining the final number of particles in an atom in a utopian realm where each atom is composed of either electrons or protons. If both an electron and a proton exist in the atom, they disappear until the atom becomes stable. The task is to process a binary string representing the charges in the atom and return the count of particles remaining after eliminating electron-proton pairs.
In utopia, God is making an atom. Each atom consists of N particles, where an electron is represented by a '0' charge and a proton by a '1'.In utopia, opposites do not exist, and no electron-proton can stay in 1 atom.
In this realm, an atom can be composed of only electrons or protons. If both an electron and proton exist in the atom, the two will disappear. This keeps on happening until the atom becomes stable.
Return the final number of particles in the given atom.
Input Format: First line contains an integer n, the number of particles Second line contains a binary string
Output Format: Print an Integer, the number of particles in the atom
Sample Input 0: 8 11101111
Sample Output 0 6
One electron disappears with 1 proton, leaving the final size of the atom to be 6.