The Little Elephant very much loves sums on intervals.

This time he has a pair of integers l and r (l ≤ r). The Little Elephant has to find the number of such integers x (l ≤ x ≤ r), that the first digit of integer x equals the last one (in decimal notation). For example, such numbers as 101, 477474 or 9 will be included in the answer and 47, 253 or 1020 will not.

Help him and count the number of described numbers x for a given pair l and r.

Input

The single line contains a pair of integers l and r (1 ≤ l ≤ r ≤ 1018) — the boundaries of the interval.

Please, do not use the %lld specifier to read or write 64-bit integers in С++. It is preferred to use cin, cout streams or the %I64d specifier.

Output

On a single line print a single integer — the answer to the problem.

Examples

Input

2 47


Output

12


Input

47 1024


Output

98

Note

In the first sample the answer includes integers 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44. 
import java.io.OutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author George Marcus
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		StreamInputReader in = new StreamInputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
	public void solve(int testNumber, StreamInputReader in, PrintWriter out) {
        long left = in.readLong();
        long right = in.readLong();

        long a = go(right);
        long b = go(left - 1);

        out.print(a - b);
	}

    private long go(long upper) {
        String repr = Long.toString(upper);
        int len = repr.length();
        long ret = 0;
        long ways = 1;
        for(int i = 0; i < len - 1; i++) {
            if(i == 0)
                ret += 10;
            else {
                ret += 9 * ways;
            }

            if(i >= 1)
                ways *= 10;
        }

        if(len == 1)
            ret += repr.charAt(0) - '0' + 1;
        else {
            long samelen = (long) ((repr.charAt(0) - '1') * Math.pow(10, repr.length() - 2));
            if(repr.charAt(0) > '0') {
                if(repr.charAt(0) > repr.charAt(repr.length() - 1))
                    samelen += go2(repr, 1, true);
                else
                    samelen += go2(repr, 1, false);
            }
            ret += samelen;
        }

        return ret;
    }

    private long go2(String repr, int pos, boolean smaller) {
        long ret = 0;
        int len = repr.length();
        if(pos >= len - 1) {
            if(smaller)
                return 0;
            return 1;
        }
        if(smaller) {
            ret += Math.pow(10, len - pos - 2) * (repr.charAt(pos) - '0');
            ret += go2(repr, pos + 1, true);
        }
        else {
            ret += Math.pow(10, len - pos - 2) * (repr.charAt(pos) - '0');
            ret += go2(repr, pos + 1, false);
        }

        return ret;
    }
}

class StreamInputReader extends InputReader {
    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar, numChars;

    public StreamInputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    }

abstract class InputReader {

    public abstract int read();

    public long readLong() {
        return Long.parseLong(readString());
    }

    public String readString() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuffer res = new StringBuffer();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }

    private boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    }

