#include <iostream>
#include <fstream>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <string>
#include <tuple>
#include <vector>
#include <map>
#include <list>
#include <set>
#include <stack>
#include <queue>
#include <cstdlib>
#include <algorithm>
#include <random>
#include <cassert>
using namespace std;
#undef INT_MIN
#undef INT_MAX
#define INT_MIN -2147483648
#define INT_MAX 2147483647

int main(){

	int a,b;
	cin>>a>>b;
	cout<<abs(a-b)<<endl;

	/*int F;
	cin>>F;
	cout<<(F-30)/2<<endl;*/
	return 0;
}
	/*int N;
	cin>>N;
	int X[100];
	for(int i=0;i<N;i=i+1){
		cin>>X[i];
	}
	int M;
	cin>>M;
	int A[100];
	for(int j=0;j<M;j=j+1){
		cin>>A[j];
	}

	for(int i=0;i<N;i=i+1){
		int judge=0;
	    for(int j=0;j<M;j=j+1){
			if(i+1!=N && i==A[j] && X[A[j]]+1!=X[A[j]+1] && X[A[j]]!=2019){
				judge=judge+1;
			}
			else if(i+1!=0 && (i!=A[j] || X[A[j]]+1==X[A[j]+1] || X[A[j]]==2019)){
				judge=judge;
			}
			else if(i+1==N && i==A[j] && X[A[j]]!=2019){
				judge=judge+1;
			}
		}
		if(judge==1){
			cout<<X[i+1]+1<<endl;
		}
		else if(judge==0){
			cout<<X[i+1]<<endl;
		}*/
	/*int A,B,C;
	cin>>A>>B>>C;
	if(C%(7*A+B)==0){
		cout<<7*(C/(7*A+B))<<endl;
	}
	else if(C%(7*A+B)!=0 && (C%(7*A+B))%A!=0 && (C%(7*A+B))<7*A){
		cout<<7*(C/(7*A+B))+(C%(7*A+B))/A+1<<endl;
	}
	else if(C%(7*A+B)!=0 && (C%(7*A+B))%A==0 && C%(7*A+B)<7*A){
		cout<<7*(C/(7*A+B))+(C%(7*A+B))/A<<endl;
	}
	else if(C%(7*A+B)!=0 && C%(7*A+B)>7*A){
		cout<<7*(C/(7*A+B))+7<<endl;
	}*/
	/*int N;
	cin>>N;
	string S;
	cin>>S;
	int judge=0;
	int i=0;
	while(i<N-1){
		if((S[i]=='O'&&S[i+1]=='X')||(S[i]=='X'&&S[i+1]=='O')){
			judge=judge+1;
			i=i+2;
		}
		else{
			judge=judge;
			i=i+1;
		}
	}

	cout<<judge<<endl;*/

	/*int N;
	cin>>N;
	int X[100];
	for(int i=0;i<N;i=i+1){
		cin>>X[i];
	}
	int M;
	cin>>M;
	int A[100];
	for(int i=0;i<M;i=i+1){
		cin>>A[i];
	}
	int B[100];
	for(int j=0;j<M;j=j+1){
		if(A[j]!=N){
			if(X[A[j]]+1!=X[A[j]+1] && X[A[j]]!=2019 && A[j]!=N){
				B[A[j]]=X[A[j]]+1;
			}
			else if(A[j]==N && X[A[j]]!=2019){
				B[A[j]]=X[A[j]]+1;
			}
			else if(X[A[j]]+1==X[A[j]+1] || X[A[j]]==2019){
				B[A[j]]=X[A[j]];
			}
		}
	for(int i=0;i<N;i=i+1){
		if(B[i]!=X[i] && B[i]!=X[i]+1){
			B[i]=X[i];
		}
	}
	for(int i=0;i<N;i=i+1){
		cout<<B[i]<<endl;
	}*/
	/*int A,B,C;
	cin>>A>>B>>C;
	if((C%(7*A+B))%A==0){
		cout<<C/(7*A+B)+(C%(7*A+B))/A<<endl;
	}
	if((C%(7*A+B))%A!=0){
		cout<<C/(7*A+B)+(C%(7*A+B))/A+1<<endl;
	}*/


	/*int N,M,D;
	cin>>N>>M>>D;
	string S[100];
	for(int i=0;i<N;i=i+1){
		cin>>S[i];
	}
	int ans=0;//東西
	int wer=0;//南北
	for(int i=0;i<N;i=i+1){
		for(int j=0;j<M;j=j+1){
			int num=0;//機材なし
			int ber=0;//機材なし
			for(int d=0;d<D && j+d<M;d=d+1){
				if(S[i][j+d]=='.'){
					num=num+1;
				}
			}
			for(int d=0;d<D && i+d<N;d=d+1){
				if(S[i+d][j]=='.' && i+d<N){
					ber=ber+1;
				}
			}
			if(num==D){
				ans=ans+1;
			}
			if(ber==D){
				wer=wer+1;
			}
		}
	}
	cout<<ans+wer<<endl;*/

	/*int N,M;
	cin>>N>>M;
	string S[50];
	for(int i=0;i<N;i=i+1){
		cin>>S[i];
	}
	int answer=999999;
	for(int wl=1;wl<N-1;wl=wl+1){
		for(int bl=1;bl<N-wl;bl=bl+1){
			int num=0;
			for(int i=0;i<N;i=i+1){
				for(int j=0;j<S[i].size();j=j+1){
				if(i+1<=wl && S[i][j]!='W'){
					num=num+1;
				}
				if(i+1>wl && i+1<=wl+bl && S[i][j]!='B'){
					num=num+1;
				}
				if(i+1>wl+bl && S[i][j]!='R'){
					num=num+1;
				}
				}
			}
			answer=min(answer,num);
		}
	}
	cout<<answer<<endl;*/
	
	/*int H,W;
	cin>>H>>W;
	int A[25][25];
	for(int i=0;i<H;i=i+1){
		for(int j=0;j<W;j=j+1){
			cin>>A[i][j];
		}
	}
	int S[25][25];
	int answer=9999999;
	for(int n=0;n<H;n=n+1){
		for(int m=0;m<W;m=m+1){
			S[n][m]=0;
			int dis[25][25];
			for(int i=0;i<H;i=i+1){
				for(int j=0;j<W;j=j+1){
					dis[i][j]=A[i][j]*min(abs(i-n),abs(j-m));
					S[n][m]=S[n][m]+dis[i][j];
				}
			}
			answer=min(S[n][m],answer);
		}
	}
	cout<<answer<<endl;*/
	/*cin>>N>>M;
	int A[100];
	for(int i=0;i<N;i=i+1){
		cin>>A[i];
	}
	for(int k=0;k<M;k=k+1){
	for(int i=0;i<N;i=i+1){
		if(A[i]%(k+1)>A[i+1]%(k+1) && i+1<N){
			swap(A[i],A[i+1]);
		}
	}
	}
	for(int i=0;i<N;i=i+1){
		cout<<A[i]<<endl;
	}*/
	/*return 0;*/


Measured memory_bytes: 3092