#include <bits/stdc++.h>
int abs(int a) {
  if (a >= 0) return a;
  return -a;
}
int main() {
  char ch;
  int res, cnt, bbb = 0;
  char str[9];
  while ((ch = getchar()) != EOF) {
    if (ch == '\n') {
      continue;
    }
    int num = ch;
    memset(str, '0', sizeof(str));
    cnt = 0;
    while (num) {
      str[cnt++] = num % 2 + '0';
      num /= 2;
    }
    str[8] = 0;
    int sum = 0, i;
    for (i = 0; i < 8; i++) sum = (sum * 2 + str[i] - '0');
    bbb += 256;
    printf("%d\n", abs(bbb - sum) % 256);
    bbb = sum;
  }
  return 0;
}
