#include <stdio.h>
#include <stdint.h>
int16_t signed_unsigned_sum(int8_t a, uint8_t b) {
// Your logic here
uint16_t x = (uint16_t)a;
uint16_t y = (uint16_t)b;
while(y){
uint16_t sum = x^y;
uint16_t carry = x & y;
y = carry<<1;
x = sum;
}
return (int16_t)x;
}
int main() {
int8_t a;
uint8_t b;
scanf("%hhd %hhu", &a, &b);
printf("%d", signed_unsigned_sum(a, b));
return 0;
}