#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2;
  int f = 0;
  cin >> s1;
  long long c = 0;
  for (int i = s1.size() - 1; i >= 0; --i) {
    if (s1[i] == '0')
      c++;
    else
      break;
  }
  s2 = s1;
  reverse(s2.begin(), s2.end());
  for (int k = 0; k < s1.size() - c; ++k) {
    if (s1[k] == s2[c + k]) f++;
  }
  if (f == (s1.size() - c))
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
