#include <bits/stdc++.h>
int main() {
  int n, temp;
  char s[n];
  scanf("%s", s);
  int l = strlen(s);
  for (int i = l - 1; i >= 0; i--) {
    if (s[i] == '0') {
      s[i] = '@';
    } else {
      temp = i;
      break;
    }
  }
  for (int j = 0; j <= (temp + 1) / 2; j++) {
    if (s[j] != s[temp - j]) {
      printf("NO");
      return 0;
    }
  }
  printf("YES");
}
