#include <bits/stdc++.h>
using namespace std;
bool CMP(int a, int b) { return a > b; }
long long int p = 1e9 + 7;
long long int power2(long long int n) {
  long long int res = 1;
  for (long long int i = 1; i <= n; i++) res *= 2;
  return res;
}
long long int power(long long int x, long long int y) {
  long long int res = 1;
  x = x % p;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int cnt1 = 0, u, cnt = 0, n;
vector<vector<long long int>> adj1(2000010);
vector<long long int> wt(200010);
long long int visi[310068], vis[3000100], last1[10000];
vector<long long int> viso;
bool ok = false;
long long int m, ans = 0;
long long int dp[200010];
bool mycompare(string s, string t) {
  string x = s + t;
  string y = t + s;
  if (x > y)
    return 1;
  else
    return 0;
}
long long int maxi = 1e7;
set<long long int> w;
pair<long long int, long long int> rotate(long long int x, long long int y,
                                          long long int a, long long int b,
                                          long long int t) {
  long long int i;
  for (i = 0; i < t; i++) {
    long long int p = a + b - y, q = x + b - a;
    x = p, y = q;
  }
  pair<long long int, long long int> P = make_pair(x, y);
  return P;
}
long long int dist(long long int x1, long long int y1, long long int x2,
                   long long int y2) {
  long long int d = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1);
  return d;
}
bool check(long long int x1, long long int y1, long long int x2,
           long long int y2, long long int x3, long long int y3,
           long long int x4, long long int y4) {
  long long int d2 = dist(x1, y1, x2, y2);
  long long int d3 = dist(x1, y1, x3, y3);
  long long int d4 = dist(x1, y1, x4, y4);
  if (d2 == 0 | d3 == 0 || d4 == 0) return false;
  if (d2 == d3 && d4 == 2 * d2 &&
      2 * dist(x2, y2, x4, y4) == dist(x2, y2, x3, y3))
    return true;
  if (d3 == d4 && d2 == 2 * d3 &&
      2 * dist(x2, y2, x3, y3) == dist(x3, y3, x4, y4))
    return true;
  if (d2 == d4 && d3 == 2 * d2 &&
      2 * dist(x2, y2, x3, y3) == dist(x2, y2, x4, y4))
    return true;
  return false;
}
long long int A[20010];
class SegmentTree {
 public:
  vector<long long int> A;
  vector<long long int> tree;
  long long int n, d;
  SegmentTree(vector<long long int> &inp, long long int depth) {
    A = inp;
    d = depth;
    n = A.size();
    tree.resize(4 * n);
    build(1, 0, n - 1, d);
  }
  void build(long long int node, long long int start, long long int end,
             long long int depth) {
    if (start == end)
      tree[node] = A[start];
    else {
      long long int mid = (start + end) / 2;
      build(2 * node, start, mid, depth - 1);
      build(2 * node + 1, mid + 1, end, depth - 1);
      if (depth % 2 == 1)
        tree[node] = tree[2 * node] | tree[2 * node + 1];
      else
        tree[node] = tree[2 * node] ^ tree[2 * node + 1];
    }
  }
  void update(long long int node, long long int start, long long int end,
              long long int idx, long long int depth) {
    if (start == end) {
      tree[node] = A[start];
    } else {
      long long int mid = (start + end) / 2;
      if (start <= idx && idx <= mid)
        update(2 * node, start, mid, idx, depth - 1);
      else
        update(2 * node + 1, mid + 1, end, idx, depth - 1);
      if (depth % 2 == 1)
        tree[node] = tree[2 * node] | tree[2 * node + 1];
      else
        tree[node] = tree[2 * node] ^ tree[2 * node + 1];
    }
  }
  long long int update(long long int index, long long int value) {
    A[index] = value;
    update(1, 0, n - 1, index, d);
    return tree[1];
  }
};
priority_queue<pair<long long int, long long int>,
               vector<pair<long long int, long long int>>,
               greater<pair<long long int, long long int>>>
    pq;
long long int sum[2000100] = {0};
long long int MEX(vector<long long int> &cnt) {
  for (long long int i = 0; i < cnt.size(); i++)
    if (cnt[i] == 0) return i;
}
vector<vector<long long int>> adj(200010);
vector<long long int> path;
vector<vector<long long int>> amd;
long long int pip = 0;
void dfs(long long int k) {
  vis[k] = 1;
  pip++;
  for (auto it = adj[k].begin(); it != adj[k].end(); it++) {
    if (vis[*it] == 0) dfs(*it);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  while (t--) {
    long long int a[4];
    cin >> a[0] >> a[1] >> a[2];
    sort(a, a + 3);
    long long int sum = a[0] + a[1] + a[2];
    cout << a[1] - a[0] + a[2] - a[1] << endl;
  }
}
