/* 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 int toInt16(byte high, byte low) {
int res = (high << 8);
res |= (low & 0xFF);
return res & 0xFFFF;
}
{
byte[] b = new byte[] {(byte)0x05, (byte)0xE0};
int a = toInt16(b[0], b[1]);
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgaW50IHRvSW50MTYoYnl0ZSBoaWdoLCBieXRlIGxvdykgewoJCWludCByZXMgPSAoaGlnaCA8PCA4KTsKCQlyZXMgfD0gKGxvdyAmIDB4RkYpOwoJCXJldHVybiByZXMgJiAweEZGRkY7Cgl9CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24KCXsKCQlieXRlW10gYiA9IG5ldyBieXRlW10geyhieXRlKTB4MDUsIChieXRlKTB4RTB9OwoJCWludCBhID0gdG9JbnQxNihiWzBdLCBiWzFdKTsKCQlTeXN0ZW0ub3V0LnByaW50bG4oSW50ZWdlci50b1N0cmluZyhhLCAxNikpOwoJfQp9