#include <bits/stdc++.h>
using namespace std;
int alpha[26] = {0}, dig[105] = {0};
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long int lcm(long long int a, long long int b) {
  return ((a * b) / gcd(a, b));
}
bool isPrime(int n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (int i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
void getArr(int a[], int n) {
  for (int i = 0; i < n; i++) cin >> a[i];
}
void putArr(int a[], int n) {
  for (int i = 0; i < n; i++) cout << a[i] << " ";
  cout << "\n";
}
void initAlpha(string s) {
  int n = s.size();
  for (int i = 0; i < n; i++) alpha[s[i] - 'a']++;
}
void initDigit(int a[], int n) {
  for (int i = 0; i < n; i++) dig[a[i]]++;
}
bool isPalindrome(string input) {
  if (input == string(input.rbegin(), input.rend())) return true;
  return false;
}
int numLen(int n) {
  int len = 0;
  while (n != 0) {
    n /= 10;
    len++;
  }
  return len;
}
void robot() {
  string s;
  char n[50];
  cin >> s;
  int l = s.size(), k = 0;
  bool flag = false;
  for (int i = l - 1; i >= 0; i--) {
    if (s[i] == '0' && !flag)
      continue;
    else {
      n[k++] = s[i];
      flag = true;
    }
  }
  n[k] = '\0';
  if (isPalindrome(n))
    cout << "YES\n";
  else
    cout << "NO\n";
}
int main() { robot(); }
