#include <bits/stdc++.h>
int main() {
  char s[100], s1[100], s2[100], s3[100], s4[100];
  scanf("%s", s);
  int i, j, c = 0, d = 0;
  for (i = 0; i < strlen(s); i++) {
    if (c == 0 && s[i] == '0')
      continue;
    else {
      c = 1;
      s1[d++] = s[i];
    }
  }
  s1[d] = '\0';
  c = 0;
  int e = 0;
  for (i = d - 1; i >= 0; i--) {
    if (c == 0 && s1[i] == '0')
      continue;
    else {
      c = 1;
      s2[e++] = s1[i];
    }
  }
  s2[e] = '\0';
  for (i = 0; i < strlen(s2); i++) s3[i] = s2[i];
  s3[strlen(s2)] = '\0';
  int f = 0;
  for (i = strlen(s3) - 1; i >= 0; i--) s4[f++] = s3[i];
  s4[f] = '\0';
  for (i = 0; i < strlen(s2); i++) {
    if (s2[i] != s4[i]) {
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n");
}
