#include <bits/stdc++.h>
using namespace std;
bool cmp(int x, int y) { return x < y; }
int gcd(int x, int y) { return 0; }
long long quick_mod() { return 0; }
string S;
bool f;
int p;
int main() {
  f = true;
  cin >> S;
  for (int i = S.size() - 1; i >= 0; i--)
    if (S[i] != '0') {
      p = i;
      break;
    }
  for (int i = 0; i < (p + 1) / 2; i++)
    if (S[i] != S[p - i]) {
      f = false;
      break;
    }
  cout << (f == true ? "YES" : "NO") << endl;
  return 0;
}
