#include <bits/stdc++.h>
using namespace std;
string s;
int ip1, ip2;
int main() {
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] != '0') {
      ip1 = i;
      break;
    }
  }
  for (int i = s.size() - 1; i >= 0; i--) {
    if (s[i] != '0') {
      ip2 = i;
      break;
    }
  }
  vector<char> v;
  for (int i = ip1; i <= ip2; i++) {
    v.push_back(s[i]);
  }
  for (int i = 0; i < v.size(); i++) {
    if (v[i] != v[v.size() - i - 1]) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
