#include <stdio.h>
int main()
{
    int low,high;
    scanf("%d%d",&low,&high);
    if(low<0 || hign<0){
        printf("Invalud input\n");
        return 0;
    }
    if (low>high){
        int temp=low;
        low=high;
        high=temp;
    }
    int sum=0;
    for (int i=low; i<=high;i++){
        if (i%7 ==0){
            sum+=i;
        }
    }
    printf("%d\n",sum);
}