#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
const long long mod = 1e9 + 7;
const int oo = 1e9;
string s;
int main() {
  cin >> s;
  int c = s.length() - 1;
  int n = s.length() - 1;
  while (s[c] == '0') c--;
  while (c < n) {
    s = '0' + s;
    c++;
  }
  for (int i = 0; i <= s.length() / 2; i++) {
    if (s[i] != s[s.length() - i - 1]) return cout << "NO", 0;
  }
  cout << "YES";
}
