#include <bits/stdc++.h>
using namespace std;
string a;
int main(int argc, char const *argv[]) {
  ios::sync_with_stdio(false);
  cin >> a;
  int tot = 0;
  bool flag = true;
  for (int i = a.length() - 1; flag && i >= 0; i--) {
    if (flag == true && a[i] == '0') {
      tot++;
    } else
      flag = false;
  }
  bool ans = true;
  int x = 0, y = a.length() - tot - 1;
  while (x <= y) {
    if (a[x] != a[y]) {
      ans = false;
    }
    x++, y--;
  }
  if (ans)
    puts("YES");
  else
    puts("NO");
  return 0;
}
