#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:255000000")
bool firstout = 1;
template <class T>
void minn(T &a, T b) {
  if (b < a) a = b;
}
template <class T>
void maxx(T &a, T b) {
  if (a < b) a = b;
}
int madd(int &a, int b) {
  a += b;
  if (a >= 1000000009) a -= 1000000009;
  return a;
}
int msub(int &a, int b) {
  a -= b;
  if (a < 0) a += 1000000009;
  return a;
}
int mmult(int &a, int b) { return a = (long long)a * b % 1000000009; }
int mdiv(long long a, long long b, long long m) {
  a = (a % 1000000009 + 1000000009) % 1000000009;
  b = (b % 1000000009 + 1000000009) % 1000000009;
  if (a % b == 0) return a / b;
  return (a + m * mdiv(-a, m, b)) / b;
}
int n, m;
int A[1012];
int main() {
  int i, j, k;
  char c;
  int a, d;
  int p = 0;
  int ts;
  for (ts = 1; scanf("%"
                     "c",
                     &(c)) > 0;
       ++ts) {
    if (c == '\n') break;
    a = c & 0xff;
    int res = 0;
    for (i = (0); i < (8); ++i)
      if ((a >> i) & 1) res |= 1 << (8 - i - 1);
    printf(
        "%"
        "d",
        ((p - res + 256) % 256));
    printf("\n"), firstout = 1;
    p = res;
  }
  return 0;
}
