/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		int x=1;
		int i=-1;
		while(x!=0)
		{
			i++;
			x=f(i);
		}
		System.out.println(""+i);
	}
	
   static int f(int x)
{
	//(x | 1402104596) = (x & 1402104596) + 543244546
	return (x | 1402104596) - (x & 1402104596) - 543244546;
}
}

