#include <bits/stdc++.h>
using namespace std;

#define INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for(int64 i = 0;i < (n);i++)
#define FOR(i, a, b) for(int64 i = (a);i < (b);i++)
#define all(x) x.begin(),x.end()
#define fs first
#define sc second

using int32 = int_fast32_t;
using uint32 = uint_fast32_t;
using int64 = int_fast64_t;
using uint64 = uint_fast64_t;
using PII = pair<int32, int32>;
using PLL = pair<int64, int64>;

const double eps = 1e-10;

template<typename A, typename B>inline void chmin(A &a, B b){if(a > b) a = b;}
template<typename A, typename B>inline void chmax(A &a, B b){if(a < b) a = b;}

template<typename T>
vector<T> make_v(size_t a){return vector<T>(a);}

template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts){
	return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}

template<typename T,typename U,typename... V>
typename enable_if<is_same<T, U>::value!=0>::type
fill_v(U &u,const V... v){u=U(v...);}

template<typename T,typename U,typename... V>
typename enable_if<is_same<T, U>::value==0>::type
fill_v(U &u,const V... v){
	for(auto &e:u) fill_v<T>(e,v...);
}

template <typename F>
class
#if defined(__has_cpp_attribute) && __has_cpp_attribute(nodiscard)
  [[nodiscard]]
#endif  // defined(__has_cpp_attribute) && __has_cpp_attribute(nodiscard)
FixPoint final : private F
{
public:
  template <typename G>
  explicit constexpr FixPoint(G&& g) noexcept
    : F{std::forward<G>(g)}
  {}

  template <typename... Args>
  constexpr decltype(auto)
  operator()(Args&&... args) const
#if !defined(__GNUC__) || defined(__clang__) || __GNUC__ >= 9
  noexcept(noexcept(F::operator()(std::declval<FixPoint>(), std::declval<Args>()...)))
#endif  // !defined(__GNUC__) || defined(__clang__) || __GNUC__ >= 9
  {
    return F::operator()(*this, std::forward<Args>(args)...);
  }
};  // class FixPoint


#if defined(__cpp_deduction_guides)
template <typename F>
FixPoint(F&&)
  -> FixPoint<std::decay_t<F>>;
#endif  // defined(__cpp_deduction_guides)


namespace
{
  template <typename F>
#if !defined(__has_cpp_attribute) || !__has_cpp_attribute(nodiscard)
  #  if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ >= 4)
__attribute__((warn_unused_result))
#  elif defined(_MSC_VER) && _MSC_VER >= 1700 && defined(_Check_return_)
_Check_return_
#  endif  // defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#endif  // !defined(__has_cpp_attribute) || !__has_cpp_attribute(nodiscard)
  inline constexpr decltype(auto)
  makeFixPoint(F&& f) noexcept
  {
    return FixPoint<std::decay_t<F>>{std::forward<std::decay_t<F>>(f)};
  }
}  // namespace

::std::map<::std::int64_t, ::std::int32_t> primeFactors(::std::int64_t x) {
  ::std::map<::std::int64_t, ::std::int32_t> res;
  for (::std::int64_t i = 2; i*i <= x; ++i) {
    if (x % i == 0) {
      while (x % i == 0) x /= i, res[i]++;
    }
  }
  if (x != 1) res[x]++;
  return res;
}


bool valid(const vector<int64>& v) {
  int64 g = v[0];
  REP(i, v.size()) {
    if (v[i] > 10000) return false;
    g = __gcd(g, v[i]);
  }
  if (g != 1) return false;
  REP(i, v.size()) {
    FOR(j, i + 1, v.size()) {
      if (__gcd(v[i], v[j]) == 1) {
        return false;
      }
    }
  }
  return true;
}

void solve(int64 N) {
  vector<int64> res(N);
  int64 now = 2;
//	set<int64> st;
  REP(i, N - 1) {
    while (__builtin_popcount(now) == 1 ||
           (now % 3 != 0 && now % 5 != 0 && now % 7 != 0 && now % 11 != 0)) now += 2;
    res[i] = now;
    now += 2;
  }
  res.back() = 3 * 5 * 7 * 11;
  int64 g = res[0];
  assert(valid(res));
  REP(i, N) {
    cout << res[i] << " ";
  }
  cout << endl;
}

void check() {
  for (int64 i = 3; i <= 2500; i += 100) {
    solve(i);
  }
}

int main(void){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int64 N;
	cin >> N;
	solve(N);
}


#include<bits/stdc++.h>
using namespace std;
#define speed ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ordered_set tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>
typedef long long int ll;
#define all(x) (x).begin(),(x).end()
#define print(x) if(x)cout<<"YES\n";else cout<<"NO\n";
#define f(i,x,y) for(ll i=x;i<=y;i++)
#define rf(i,x,y) for(ll i=x;i>=y;i--)
#define pb push_back
#define F first
#define S second
#define mod 1e9
#define N 1000001
void solve()
{
}
  
  
int main()
{

  #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
  #endif
  speed;
  string s;
  cin>>s;
  vector<char>v;
  for(auto x:s)
    v.pb(x);
  for(int i=v.size()-1;i>=0;i--)
  {
    if(v[i]=='0')
      v.pop_back();
    else
    {
      break;
    }
  }
  string a;
  for(auto x:v)
    a+=x;
  string b=a;
  reverse(b.begin(),b.end());
  if(a==b)
    cout<<"Yes";
  else
    cout<<"No";
 } 

  

