#include <bits/stdc++.h> using namespace std; int judge1(int num) { int n[9]; int f = 1; for (int i = 1;; i++) { n[i] = num % 10; num /= 10; if (n[i] % 2 != i%2) { f = 0; break; } if (!num) { break; } } return f; } int main() { ios::sync_with_stdio(0); cin.tie(0); int nu; cin >> nu; int ans = 0; for (int i = 1; i <= nu; i++) { ans+=judge1(i); } cout << ans; }
0.0分
0 人评分