#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[20];
  cin >> s;
  int len = strlen(s);
  string ss = "";
  for (int i = len - 1; i >= 0; i--) {
    if (s[i] != '0') {
      string t = (string)s;
      ss = t.substr(0, i + 1);
      break;
    }
  }
  int siz = ss.size() - 1;
  bool f = 0;
  for (int i = 0; i < ss.size() / 2; i++) {
    if (ss[i] == ss[siz - i])
      ;
    else {
      f = 1;
      break;
    }
  }
  if (f == 0)
    puts("YES");
  else
    puts("NO");
  return (0);
}
