#include <bits/stdc++.h>
using namespace std;
string str;
bool isPallin(int start, int end) {
  while (start < end) {
    if (str[start] != str[end]) return false;
    start++;
    end--;
  }
  return true;
}
int main() {
  cin >> str;
  int len = str.length();
  int i;
  for (i = len - 1; i >= 0; i--) {
    if (str[i] != '0') break;
  }
  int end = i;
  for (i = 0; i < end; i++) {
    if (str[i] != '0') break;
  }
  int start = i;
  if (start > end) {
    cout << "YES" << endl;
    return 0;
  }
  if (isPallin(start, end)) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
