1. 

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

/*
* @author Taskin Umut Hidir Sayli Lermer Florian
*
* Applied Mathematics SS09 IFB-2C
* ACM Problem 10469
* @link http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=16&problem=1410&mosmsg=Submission+received+with+ID+7123565
* status: Accepted
* Runtime 0.088
*
*/

public class Main {

/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String s=br.readLine();
while(s!=null)
{
StringTokenizer st=new StringTokenizer(s);
int x =Integer.parseInt(st.nextToken());
int y =Integer.parseInt(st.nextToken());
System.out.println(x^y);
s=br.readLine();
}


}

}

2.

/**
* Angewandte Mathematik, SS09, IFB 2C
* ACM Problem: To Carry or not to Carry (10469)
* @author Christian Mitterreiter
* @author Rolf Luigs
* @version 1.0, 05/03/2009
* Status : Accepted
* Runtime: 0.120
*/


import java.util.Scanner;

public class Main {

public static void main(String[] args) {

Scanner sc = new Scanner(System.in);

while(sc.hasNextInt()) {
System.out.println(sc.nextInt()^sc.nextInt());
}
}
}

3.

/**
* Angewandte Mathematik, SS09, IFB 2C
* ACM Problem 10469 - To Carry or not to Carry
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=16&problem=1410&mosmsg=Submission+received+with+ID+7130563
* @author Miesel Christoph
* @author Seilbeck Robert
* @author Wolfram Andre
* @version 1.0 15.05.2009
*
* Status : Accepted
* Runtime: 0.124
*/


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

public class Main
{
public static void main(String[] args) throws Exception
{
Scanner sc = new Scanner(System.in);


while(sc.hasNext())
{
int first = sc.nextInt();
int second = sc.nextInt();
System.out.println(first ^ second);
}
}
}

4.

/*
* 10469 - To Carry or not to Carry
*
* Studiengruppe: IFB2C
*
* Martin Pesl
* Robert Reichart
* Elvin Uzeirovic
*
* Run Time Submission Date
* 0.088 2009-05-13 09:17:02
*/

import java.io.*;

class Main{
public static void main(String... args)throws Exception{
BufferedReader is = new BufferedReader(new InputStreamReader(System.in));
//BufferedWriter os = new BufferedWriter(new OutputStreamWriter(System.out));
String line;
String[] werte = new String[2];
int wert1;
int wert2;
while(is.ready()){
line = is.readLine();
werte = line.split(" ");
wert1 = Integer.parseInt(werte[0]);
wert2 = Integer.parseInt(werte[1]);
//os.write(wert1 ^ wert2);
//os.newLine();
System.out.println(wert1 ^ wert2);
}
}
}

5.

/**
* Angewandte Mathematik, SS09, IFB 2C
* ACM Problem #10469 To Carry or not to Carry
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=16&page=show_problem&problem=1410
*
* @author Fabian Seidl
* @author Marcel Sachse
* @version 1.0, 29/04/2009
*
* Status : Accepted
* Runtime: 0.132
*/

import java.io.*;
import java.util.Scanner;

public class Main
{

public static void main(String[] args) throws Exception
{

BufferedInputStream bInput = new BufferedInputStream(System.in);
Scanner scanner = new Scanner(bInput);

Writer out = new BufferedWriter(new PrintWriter(System.out));

while(scanner.hasNextLong())
{
long a = scanner.nextLong();
if(!scanner.hasNextLong()) break;
long b = scanner.nextLong();

long c = a ^ b;

out.write(c+"\n");
}
out.close();
scanner.close();
}


}