import std.stdio, std.string, std.conv;
import std.typecons;
import std.algorithm, std.array, std.range, std.container;
import std.math;

void main() {
	auto data = readln.split;
	auto A = data[0].to!long, B = data[1].to!long;
	
	long ans;
	foreach (i; 0 .. 41) {
		int num; 
		foreach (n; A .. B+1) {
			(n & (2L^^i)) != 0 ? num++ : 0;
		}
		if (num % 2 != 0) { ans += 2L^^i; }
	}
	writeln(ans);
}
