第十三届JAVAB组决赛——9.好数之和
import java.io.*;
import java.util.*;
public class Main{
public static BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
public static PrintWriter stdOut = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
public static void main(String[] args) throws IOException{
String[] sp = stdIn.readLine().split(" ");
long l = Long.parseLong(sp[0]); long r = Long.parseLong(sp[1]);
long res = 0;
for(long i = l; i <= r; i++) {
if(new StringBuffer(i+"").indexOf("2022") != -1) res += i;
}
stdOut.println(res);
stdOut.flush();
}
}