#include <bits/stdc++.h>
using namespace std;
bool ispal(int x, int y, string &s) {
  if (x >= y) return 1;
  if (s[x] != s[y]) return 0;
  return ispal(x + 1, y - 1, s);
}
int main() {
  std::ios_base::sync_with_stdio(0);
  int cases, caseno = 0, n, i, j, k, cnt, sum;
  string s;
  cin >> s;
  n = s.size();
  for (i = n - 1; i >= 0; i--) {
    if (ispal(0, i, s)) {
      cout << "YES";
      return 0;
    }
    if (s[i] != '0') break;
  }
  cout << "NO";
  return 0;
}
