#include<stdio.h>
int main()
{
    int lower_bound,upper_bound;
    if(scan("%d %d",&lower_bound,&upper_bound) !=2)
    {
        return 1;
    }
    if(lower_bound < 0 || upper_bound < 0 || lower_bound > upper_bound)
    {
        printf("Invalid input");
    }
    else
    {
        int sum=0;
        for(int age=lower_bound; age <= upper_bound; age++)
        {
            if(age%7==0)
            {
                sum+=age;
            }
        }
        printf("%d\n",sum);
    }
    return 0;
}