#include <bits/stdc++.h>
using namespace std;
int main() {
  int z = -1, o = -1;
  string s;
  cin >> s;
  int j = 0;
  for (int i = s.size() - 1; i >= 0; i--) {
    if (z == -1 && s[i] != '0') z = i;
    if (o == -1 && s[j] != '0') o = j;
    j++;
  }
  bool pal = true;
  for (int i = o; i <= z; i++)
    if (s[i] != s[z - i]) {
      pal = false;
      break;
    }
  if (pal)
    cout << "YES";
  else
    cout << "NO";
}
