#include <bits/stdc++.h>
using namespace std;
bool isPalindrome(string s);
int main() {
  string s;
  cin >> s;
  while (s[0] == '0') {
    s.erase(0, 1);
  }
  int j = s.size() - 1;
  while (s[j] == '0') {
    s.erase(j, 1);
    j--;
  }
  if (isPalindrome(s)) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
bool isPalindrome(string s) {
  int a = 0, b = s.size() - 1;
  while (a < b) {
    if (s[a] != s[b]) {
      return false;
    }
    a++;
    b--;
  }
  return true;
}
