#include using namespace std; int S[100000]; int total; int main() { int a, b; for(int i = 1; i < 100000; ++i) { for(int j = i; j; j /= 10) S[i] += j % 10; if(i % 2 == 1) total += S[i]; } cin >> a >> b; if(a % 2 == 0) ++a; long long ans = 0; for(int i = a; i <= b;) { if(i % 100000 == 1 && i + 100000 <= b) { ans += 1LL * S[i / 100000] * 50000; ans += total; i += 100000; } else { ans += S[i / 100000] + S[i % 100000]; i += 2; } } cout << ans; return 0; }