#include <bits/stdc++.h>
using namespace std;
template <class T>
void pp(T v) {
  for (__typeof((v).begin()) it = (v).begin(); it != (v).end(); ++it)
    cout << *it << ' ';
  cout << endl;
}
template <class T>
void pp(T v, int n) {
  for (int i = 0; i < (int)n; i++) cout << v[i] << ' ';
  cout << endl;
}
const int INF = 1 << 28;
const double EPS = 1.0e-9;
const int MODULO = 256;
int rev(int n) {
  int ans = 0;
  for (int i = 0; i < 8; i++) {
    ans = ans << 1;
    ans += (n % 2);
    n = n >> 1;
  }
  return ans;
}
int main(void) {
  string input = "";
  int c;
  int old_c = 0;
  while ((c = getchar()) != EOF) {
    if (c >= 32 && c <= 126) {
      int old = rev(old_c);
      old_c = c;
      int a = rev(c);
      int b = (old - a + MODULO) % MODULO;
      cout << b << endl;
    }
  }
  return 0;
}
