#include<queue>
#include<stack>
#include<math.h>
#include<cmath>
#include<bitset>
#include<stdio.h>
#include<string>
#include<map>
#include<algorithm>
#include<vector>
#include<iostream>
#include<utility>
#include<functional>
#include<deque>
#include<list>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
int main(){
  int k,n,l,i;
  int ans=(1<<29);
  cin >> n >> l;
  vector<int> x(n);
  for(i=0;i<n;i++){
    x[i]=l+(i+1)-1;
    if(abs(x[i])<ans){
      ans=abs(x[i]);
      k=x[i];
    }
  }
  for(i=0;i<n;i++){
    if(k==x[i]){
      x[i]=0;
      break;
    }
  }
  int sum=0;
  for(i=0;i<n;i++){
    sum+=x[i];
  }
  cout << sum << endl;
  return 0;
}
#include<iostream>

using namespace std;

int main()
{
	int month[12];

	month[0]=31;
	month[1]=29;
	month[2]=31;
	month[3]=30;
	month[4]=31;
	month[5]=30;
	month[6]=31;
	month[7]=31;
	month[8]=30;
	month[9]=31;
	month[10]=30;
	month[11]=31;

	int hoge,fuga;

	hoge = 1;

	int i;
	int count=0;

	while(hoge!=0)
	{
		count = 0;
		cin >> hoge >> fuga;
		//cout << count << endl;
		for(i=0;i<hoge-1;i++)
		{
			count+=month[i];
		}	
		//cout << count << endl;

		count+=fuga;

		//cout << count << endl;

		int flag = 0;
	
		flag = count % 7;

		if(flag==0 & hoge!=0)
		{
			cout << "Wednesday" <<endl;
		}
		if(flag==1 & hoge!=0)
		{
			cout << "Thursday" <<endl;
		}
		if(flag==2 & hoge!=0)
		{
			cout << "Friday" <<endl;
		}
		if(flag==3 & hoge!=0)
		{
			cout << "Saturday" <<endl;
		}
		if(flag==4 & hoge!=0)
		{
			cout << "Sunday" <<endl;
		}
		if(flag==5 & hoge!=0)
		{
			cout << "Monday" <<endl;
		}
		if(flag==6 & hoge!=0)
		{
			cout << "Tuesday" <<endl;
		}
	}
}