function Main(input) {
    const [N, ...S] = input.split("\n")
    S.sort()
    const s = S.reduce((pre, cur, index) => {
        return !pre[index-1] ? [cur] : pre[index-1] === cur ? pre : [...pre, cur]
    },[])
    console.log(s.length)
    // console.log(new Set(S).size)
}
Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());


P,Q,R = list(map(int,input().split()))
ABC=P+Q
ACB=R+Q
BAC=P+R
BCA=Q+R
CAB=R+P
CBA=Q+P
print(min([ABC,ACB,BAC,BCA,CAB,CBA]))


P, Q, R = map(int, input().split())
print(min(P+Q, Q+R, R+P))


# -*- coding: utf-8 -*-
P,Q,R = [int(i) for i in input().split()]
if P+Q <= Q+R and P+Q <= P+R:
    print(P+Q)
elif Q+R <= P+Q and Q+R <= P+R:
    print(Q+R)
elif P+R <= Q+R and P+R <= P+Q:
    print(P+R)


p, q, r = map(int, input().split())

print(sum[p, q, r] - max[p, q, r])


P, Q, R = map(int, input().split())

list_m = [P+Q,R+Q,P+R,Q+R,R+P,Q+P]

min = 100
for i in range(0,len(list_m)):
    if min > int(list_m[i]):
        min = list_m[i]

print(min)


P, Q, R = map(int, input().split())

list_m = [P + Q,R + Q,P + R,Q + R,R + P,Q + P]

min = 100
for i in range(len(list_m)):
    if min > int(list_m[i]):
        min = list_m[i]

print(min)


import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;

public class Main {

    static PrintWriter out;
    static InputReader sc;

    static void solve() {
        int[] t = new int[3];
        for (int i = 0; i < 3; i++) {
            t[i] = sc.nextInt();
        }
        Arrays.sort(t);
        out.println(t[0] + t[1]);
    }

    public static void main(String[] args) {
        sc = new InputReader(System.in);
        out = new PrintWriter(System.out);
        solve();
        out.flush();
    }

    public static class ArraysFillEx {

        public static void fill(Object array, Object value) {

            // 第一引数が配列か判定
            Class<?> type = array.getClass();
            if (!type.isArray()) {
                throw new IllegalArgumentException("not array");
            }

            // クラスの型を判定
            String arrayClassName = array.getClass().getSimpleName().replace("[]", "").toLowerCase();
            String valueClassName = value.getClass().getSimpleName().toLowerCase().replace("character", "char")
                    .replace("integer", "int");
            if (!arrayClassName.equals(valueClassName)) {
                throw new IllegalArgumentException("does not match");
            }

            // 処理
            if (type.getComponentType().isArray()) {
                for (Object o : (Object[]) array) {
                    fill(o, value);
                }
            } else if (array instanceof boolean[]) {
                Arrays.fill((boolean[]) array, (boolean) value);
            } else if (array instanceof char[]) {
                Arrays.fill((char[]) array, (char) value);
            } else if (array instanceof byte[]) {
                Arrays.fill((byte[]) array, (byte) value);
            } else if (array instanceof short[]) {
                Arrays.fill((short[]) array, (short) value);
            } else if (array instanceof int[]) {
                Arrays.fill((int[]) array, (int) value);
            } else if (array instanceof long[]) {
                Arrays.fill((long[]) array, (long) value);
            } else if (array instanceof float[]) {
                Arrays.fill((float[]) array, (float) value);
            } else if (array instanceof double[]) {
                Arrays.fill((double[]) array, (double) value);
            } else {
                Arrays.fill((Object[]) array, value);
            }
        }

    }

    static class InputReader {

        private InputStream in;
        private byte[] buffer = new byte[1024];
        private int curbuf;
        private int lenbuf;

        public InputReader(InputStream in) {
            this.in = in;
            this.curbuf = this.lenbuf = 0;
        }

        public boolean hasNextByte() {
            if (this.curbuf >= this.lenbuf) {
                this.curbuf = 0;
                try {
                    this.lenbuf = this.in.read(this.buffer);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (this.lenbuf <= 0) {
                    return false;
                }
            }
            return true;
        }

        private int readByte() {
            if (this.hasNextByte()) {
                return this.buffer[this.curbuf++];
            } else {
                return -1;
            }
        }

        private boolean isSpaceChar(int c) {
            return !(c >= 33 && c <= 126);
        }

        private void skip() {
            while (this.hasNextByte() && this.isSpaceChar(this.buffer[this.curbuf])) {
                this.curbuf++;
            }
        }

        public boolean hasNext() {
            this.skip();
            return this.hasNextByte();
        }

        public String next() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            StringBuilder sb = new StringBuilder();
            int b = this.readByte();
            while (!this.isSpaceChar(b)) {
                sb.appendCodePoint(b);
                b = this.readByte();
            }
            return sb.toString();
        }

        public int nextInt() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            int c = this.readByte();
            while (this.isSpaceChar(c)) {
                c = this.readByte();
            }
            boolean minus = false;
            if (c == '-') {
                minus = true;
                c = this.readByte();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res = res * 10 + c - '0';
                c = this.readByte();
            } while (!this.isSpaceChar(c));
            return minus ? -res : res;
        }

        public long nextLong() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            int c = this.readByte();
            while (this.isSpaceChar(c)) {
                c = this.readByte();
            }
            boolean minus = false;
            if (c == '-') {
                minus = true;
                c = this.readByte();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res = res * 10 + c - '0';
                c = this.readByte();
            } while (!this.isSpaceChar(c));
            return minus ? -res : res;
        }

        public double nextDouble() {
            return Double.parseDouble(this.next());
        }

        public int[] nextIntArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = this.nextInt();
            }
            return a;
        }

        public long[] nextLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = this.nextLong();
            }
            return a;
        }

        public char[][] nextCharMap(int n, int m) {
            char[][] map = new char[n][m];
            for (int i = 0; i < n; i++) {
                map[i] = this.next().toCharArray();
            }
            return map;
        }
    }

    static void tr(Object... o) {
        out.println(Arrays.deepToString(o));
    }
}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int p = Integer.parseInt(str[0]);
    int q = Integer.parseInt(str[1]);
    int r = Integer.parseInt(str[2]);

    int ans = 0;
    System.out.println(Math.min(p+q,Math.min(q+r,p+r)));
  }
}


import java.io.*;
import java.util.*;

public class Main {
	static InputStream is;
	static PrintWriter out;
	static String INPUT = "";

	static final long mod = (long) 1e9 + 7;
	static final int dx[] = { -1, 0, 1, 0 }, dy[] = { 0, -1, 0, 1 };
	static final int[] dx8 = { -1, -1, -1, 0, 0, 1, 1, 1 }, dy8 = { -1, 0, 1, -1, 1, -1, 0, 1 };
	static final int inf = Integer.MAX_VALUE / 3;
	static final long linf = Long.MAX_VALUE / 3;
	static final double dinf = Double.MAX_VALUE / 3;

	static void solve() {

		int p = ni(), q = ni(), r = ni();
		long ans = inf;
		ans = min(ans,p + q);
		ans = min(ans,p + r);
		ans = min(ans,r + q);
		out.println(ans);

	}

	//libraries
	static int[] concat(int x, int arr[]) {
		int ret[] = new int[arr.length + 1];
		System.arraycopy(arr, 0, ret, 1, ret.length - 1);
		ret[0] = x;
		return ret;
	}

	static int[] concat(int arr[], int x) {
		int ret[] = new int[arr.length + 1];
		System.arraycopy(arr, 0, ret, 0, ret.length - 1);
		ret[ret.length - 1] = x;
		return ret;
	}

	static long[] concat(long x, long arr[]) {
		long ret[] = new long[arr.length + 1];
		System.arraycopy(arr, 0, ret, 1, ret.length - 1);
		ret[0] = x;
		return ret;
	}

	static long[] concat(long arr[], long x) {
		long ret[] = new long[arr.length + 1];
		System.arraycopy(arr, 0, ret, 0, ret.length - 1);
		ret[ret.length - 1] = x;
		return ret;
	}

	static long max(long x, long y) {
		return Math.max(x, y);
	}

	static long min(long x, long y) {
		return Math.min(x, y);
	}

	static long max(long x, long y, long z) {
		x = Math.max(x, y);
		x = Math.max(x, z);
		return x;
	}

	static long min(long x, long y, long z) {
		x = Math.min(x, y);
		x = Math.min(x, z);
		return x;
	}

	static double max(double x, double y) {
		return Math.max(x, y);
	}

	static double min(double x, double y) {
		return Math.min(x, y);
	}

	static double max(double x, double y, double z) {
		x = Math.max(x, y);
		x = Math.max(x, z);
		return x;
	}

	static double min(double x, double y, double z) {
		x = Math.min(x, y);
		x = Math.min(x, z);
		return x;
	}

	static void rsort(int[] ar) {
		Arrays.sort(ar);
		int len = ar.length;
		for (int i = 0; i < len / 2; i++) {
			int tmp = ar[i];
			ar[i] = ar[len - 1 - i];
			ar[len - 1 - i] = tmp;
		}
	}

	static void rsort(long[] ar) {
		Arrays.sort(ar);
		int len = ar.length;
		for (int i = 0; i < len / 2; i++) {
			long tmp = ar[i];
			ar[i] = ar[len - 1 - i];
			ar[len - 1 - i] = tmp;
		}
	}

	static void rsort(double[] ar) {
		Arrays.sort(ar);
		int len = ar.length;
		for (int i = 0; i < len / 2; i++) {
			double tmp = ar[i];
			ar[i] = ar[len - 1 - i];
			ar[len - 1 - i] = tmp;
		}
	}

	static void fill(int arr[], int x) {
		Arrays.fill(arr, x);
	}

	static void fill(long arr[], long x) {
		Arrays.fill(arr, x);
	}

	static void fill(double arr[], double x) {
		Arrays.fill(arr, x);
	}

	static void fill(int arr[][], int x) {
		for (int i = 0; i < arr.length; i++)
			Arrays.fill(arr[i], x);
	}

	static void fill(long arr[][], long x) {
		for (int i = 0; i < arr.length; i++)
			Arrays.fill(arr[i], x);
	}

	static void fill(double arr[][], double x) {
		for (int i = 0; i < arr.length; i++)
			Arrays.fill(arr[i], x);
	}

	//MOD culc
	static long plus(long x, long y) {
		long res = (x + y) % mod;
		return res < 0 ? res + mod : res;
	}

	static long sub(long x, long y) {
		long res = (x - y) % mod;
		return res < 0 ? res + mod : res;
	}

	static long mul(long x, long y) {
		long res = (x * y) % mod;
		return res < 0 ? res + mod : res;
	}

	static long div(long x, long y) {
		long res = x * pow(y, mod - 2) % mod;
		return res < 0 ? res + mod : res;
	}

	static long pow(long x, long y) {
		if (y < 0)
			return 0;
		if (y == 0)
			return 1;
		if (y % 2 == 1)
			return (x * pow(x, y - 1)) % mod;
		long root = pow(x, y / 2);
		return root * root % mod;
	}

	public static void main(String[] args) throws Exception {
		is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		out = new PrintWriter(System.out);
		solve();
		out.flush();
	}

	//input
	private static byte[] inbuf = new byte[1024];
	static int lenbuf = 0, ptrbuf = 0;

	private static int readByte() {
		if (lenbuf == -1)
			throw new InputMismatchException();
		if (ptrbuf >= lenbuf) {
			ptrbuf = 0;
			try {
				lenbuf = is.read(inbuf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (lenbuf <= 0)
				return -1;
		}
		return inbuf[ptrbuf++];
	}

	private static boolean isSpaceChar(int c) {
		return !(c >= 33 && c <= 126);
	}

	private static int skip() {
		int b;
		while ((b = readByte()) != -1 && isSpaceChar(b))
			;
		return b;
	}

	private static double nd() {
		return Double.parseDouble(ns());
	}

	private static char nc() {
		return (char) skip();
	}

	private static String ns() {
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while (!(isSpaceChar(b))) {
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	private static char[] ns(int n) {
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while (p < n && !(isSpaceChar(b))) {
			buf[p++] = (char) b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}

	private static char[][] nm(int n, int m) {
		char[][] map = new char[n][];
		for (int i = 0; i < n; i++)
			map[i] = ns(m);
		return map;
	}

	private static int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}

	private static int ni() {
		int num = 0, b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}

		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private static long nl() {
		long num = 0;
		int b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}

		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

}


import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc =new Scanner(System.in);
		int[] line = new int[3];

		for (int i = 0; i < 3; i++) {
			line[i] = sc.nextInt();
		}

		int min = Integer.MAX_VALUE;

		for (int i = 0; i < args.length; i++) {
			for (int j = 0; j < args.length; j++) {
				if (i ==j) {
					continue;
				}
				min = Math.min(min, line[i] + line[j]);
			}
		}

		System.out.println(min);
	}

}


import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc =new Scanner(System.in);
		int[] line = new int[3];

		for (int i = 0; i < 3; i++) {
			line[i] = sc.nextInt();
		}

		int min = Integer.MAX_VALUE;

		for (int i = 0; i < args.length; i++) {
			for (int j = 0; j < args.length; j++) {
				if (i ==j) {
					continue;
				}
				min = Math.min(min, line[i] + line[j])
			}
		}

		System.out.println(min);
	}

}


#include<stdio.h>
int main()
{
    int p,q,r;
    scanf("%d%d%d",&p,&q,&r);
    int a,b,c;
    a=p+q;b=p+r;c=q+r;
    if(a>b)
        a=b;
    if(a>c)
        a=c;
    printf("%d\n",a);
}


#include<stdio.h>
int main()
{
    int a,b,c,mmin;
    scanf("%d%d%d",&a,&b,&c);
    mmin=(a+b)<(a+c)?(a+b):(a+c);
    mmin=mmin<(b+c)?mmin:(b+c);
    printf("%d\n",mmin);
    return 0;
}


#include<stdio.h>
#include<algorithm>
#include<string.h>
using namespace std;
int a[20];
int b[20];
int ans=0;
int vis[25];
void dfs(int sum,int deep)
{
    if(deep==2)
    {
                b[++ans]=sum;
                return;

    }
    for(int i=1;i<=3;i++)
    {
        if(vis[i]==0)
        {
            vis[i]=1;
        dfs(sum+a[i],deep+1);
        vis[i]=0;
        }

    }
}
int main()
{
    ans=0;
    memset(vis,0,sizeof(vis));
    for(int i=1;i<=3;i++)
        scanf("%d",&a[i]);
        dfs(0,0);
    sort(b+1,b+1+ans);
        printf("%d\n",b[1]);
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

long long dp[100010];
long long nota[100010];

long long rec(int i){
if(i==0)return 0;
long long x=1000000007;
if(dp[i]!=-1){
if(i==1)return dp[i]=1;
if(i>1){
dp[i]=(rec(i-1)+1+rec(i-2)+1+x)%x;
}
  return dp[i];
}
else return dp[i];

}
int main(){
int n,m;

  cin >> n >> m;
for(int i=0;i<100010;i++){
cin >> nota[i];
dp[i]=0;
}
for(int i=0;i<m;i++){
dp[nota[i]]=-1;
}

cout << rec(n) << endl;
}


#include <bits/stdc++.h>
using namespace std;

long long dp[100010];
long long nota[100010];

long long rec(int i){
if(i==0)return 0;
long long x=1000000007;
if(dp[i]!=-1){
if(i==1)return dp[i]=1;
if(i>1){
dp[i]=(rec(n-1)+1+rec(n-2)+1+x)%x;
}
  return dp[i];
}
else return dp[i];

}
int main(){
int n,m;

  cin >> n >> m;
for(int i=0;i<100010;i++){
cin >> nota[i];
dp[i]=0;
}
for(int i=0;i<m;i++){
dp[nota[i]]=-1;
}

cout << rec(n) << endl;
}


#include <bits/stdc++.h>
using namespace std;

int n,m;
long long dp[100010];
long long nota[100010];

long long rec(int i){
if(i==0)return 0;
long long x=1000000007;
if(dp[i]!=-1){
if(i==1)return dp[i]=1;
if(i>1){
dp[i]=(rec(n-1)+1+rec(n-2)+1+x)%x;
}
  return dp[i];
}
else return dp[i];

}
int main(){

  cin >> n >> m;
for(int i=0;i<100010;i++){
cin >> nota[i];
dp[i]=0;
}
for(int i=0;i<m;i++){
dp[nota[i]]=-1;
}

cout << rec(n) << endl;
}


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k))
#define INF ((1LL<<62)-(1LL<<31))
#define max(p,q)((p)>(q)?(p):(q))
#define min(p,q)((p)<(q)?(p):(q))
#define bit(n,m)(((n)>>(m))&1)
int upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;}
int downll(const void*a, const void*b){return*(ll*)a<*(ll*)b?1:*(ll*)a>*(ll*)b?-1:0;}
void sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);}
void sortdown(ll*a,int n){qsort(a,n,sizeof(ll),downll);}
ll pom(ll a,ll n,int m){ll x=1;for(a%=m;n;n/=2)n&1?x=x*a%m:0,a=a*a%m;return x;}
//#define MOD 998244353
#define MOD 1000000007
#define invp(a,p)pom(a,p-2,p)

ll a,b,c;
int main(){
	scanf("%lld%lld%lld",&a,&b,&c);
    printf("%lld",a+b+c-max(a,max(b,c)));
}


#include <stdio.h>

#define max(a,b) (((a)>(b))?(a):(b))
int main(void)
{
	int p, q, r;
	scanf("%d %d %d", &p, &q, &r);
	printf("%d\n",p+q+r-max(max(p,q),max(q,r)));
	return(0);
}


#include<stdio.h>
int main(void){
    int a,b,c;
    int ab,bc,ca;
    scanf("%d %d %d",&a,&b,&c);
    ab=a+b;
    bc=b+c;
    ca=c+a;
    if(ab<bc&&ab<ca){
        printf("%d\n",ab);
    }else if(bc<ca){
        printf("%d\n",bc);
    }else{
        printf("%d\n",ca);
    }
    return 0;
}


#include <stdio.h>
int main(){
  int N,W[200],M=1000000;
  scanf("%d",&N);
  W[0]=0;
  for(int i=1;i<=N;i++){
    scanf("%d",W+i);
    W[i]+=W[i-1];
  }
  int S;
  for(int i=1;i<N;i++){
    S=W[N]-2*W[i];
    if(S<0) S=-S;
    if(S<M) M=S;
  }
  printf("%d\n",M);
  return 0;
}


#include<stdio.h>
int main(void){
	int a,b,c;
	scanf("%d%d%d",&a,&b,&c);
	if(a>=b&&a>=c){
	printf("%d",b+c);
    } else if {(b>=a&&b>=c)
	printf("%d",a+c);
    } else {
	printf("%d",a+b);
    }
	return 0;
}


#include<stdio.h>
int main()
{
	int a,b,c,x=0,y=0,z=0;
	scanf("%d %d %d",&a,&b,&c);
	x=a+b;
	y=a+c;
	z=b+c;
	if(x<=y&&x<=z) printf("%d\n",x);
	if(y<x&&y<=z) printf("%d\n",x);
	if(z<x&&z<y) printf("%d\n",z);
	return 0;
}


var input = require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n");
var obj = {
  "list" : input,
  "index" : 0,
  "max" : input.length,
  "next" : function(){
    if(!this.hasNext()){throw "NoSuchElementException:次に要素は無いよ";}
    var returnObj = this.list[this.index];
    this.index++;
    return returnObj;
  },
  "hasNext" : function(){return (this.index < this.max);}
}
Main();
function next(){return obj.next();}
function nextInt(){return myconv(next(),1);}
function nextStrArray(){return myconv(next(),2);}//半角スペース分割
function nextIntArray(){return myconv(next(),4);}//半角スペース + 数値化
function nextCharArray(){return myconv(next(),6);}//1文字分割
function hasNext(){return obj.hasNext();}
function myout(t){console.log(t);}//標準出力
function myerr(t){console.error(t);}//標準エラー出力
//[no]要素の扱い。数値型
//不明値、異常時:引数そのまま返す　1:数値へ変換
//2:半角SPで分割 4:半角SPで分割し、数値配列へ
//6:1文字で分割  7:1文字で分割し、数値配列へ
//8:半角SPで結合 9:改行で結合 0:文字なしで結合
function myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(" ");case 4:return i.split(" ").map((a)=>Number(a));case 6:return i.split("");case 7:return i.split("").map((a)=>Number(a));case 8:return i.join(" ");case 9:return i.join("\n");case 0:return i.join("");default:return i;}}catch(e){return i;}}
function Main(){
  var one = nextIntArray();
  var P = one[0];
  var Q = one[1];
  var R = one[2];
  var output = [P + Q,Q + R, R + P];
  myout(Math.min.apply(null,output));
}


function Main(input){
var P = input.split(" ")[0];
var Q = input.split(" ")[1];
var R = input.split(" ")[2];
var A = new Number(P)+new Number(Q);
var B = new Number(Q)+new Number(R);
var C = new Number(R)+new Number(P);
if(A>=B&&C>=B){
  console.log(B);
}else if(B>=A&&C>=A){
  console.log(A);
}else if(B>=C&&A>=C){
  console.log(C);
}
}
  Main(require('fs').readFileSync('/dev/stdin','utf8'));


function Main(input) {
  tmp = input.split(" ").sort();
  console.log(Number(tmp[0])+ Number(tmp[1]));
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function main(intput){
    const args=input.split(' ');
    const p=parseInt(args[0],10);
    const q=parseInt(args[1],10);
    const r=parseInt(args[2],10);
    const array=[p+q,p+r,r+q];
    console.log(Math.min.apply(null,array));
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function main(input){
  const args=input.split(' ');
  const P=parseInt(args[0], 10);
  const Q=parseInt(args[1], 10);
  const R=parseInt(args[2], 10);
  const arrr=[P+Q, P+R, Q+R];
  console.log(arrr);
  console.log(Math.min.apply(null, arrr));
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));


process.stdin.resume();
process.stdin.setEncoding('utf8');

var lines = [];
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line', (line) => {
  lines.push(line)
});

reader.on('close', () => {

  lines = lines[0].split(' ')

  var min = Math.min(...lines)
  lines = lines.filter(x => x != min)
  var minSecond = Math.min(...lines)

  console.log(min + minSecond)

});


package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
	"strings"
)

var sc = bufio.NewReaderSize(os.Stdin, 1024*1024*1)

func main() {
	list := getStdinIntArr()

	min := math.MaxInt32
	for i := 0; i < 3; i++ {
		for j := 0; j < 3; j++ {
			if i == j {
				continue
			}
			if list[i]+list[j] < min {
				min = list[i] + list[j]
			}
		}
	}

	fmt.Printf("%d\n", min)
}

func getStdin() string {
	return readLine()
}
func getStdinArr() []string {
	str := getStdin()
	list := strings.Split(str, " ")
	return list
}
func getStdinInt() int {
	str := getStdin()
	rtn, _ := strconv.Atoi(str)
	return rtn
}
func getStdinIntArr() []int {
	str := getStdin()
	list := strings.Split(str, " ")
	rtn := make([]int, len(list))
	for idx, val := range list {
		rtn[idx], _ = strconv.Atoi(val)
	}
	return rtn
}

func getStdinIntArr64() []int64 {
	str := getStdin()
	list := strings.Split(str, " ")
	rtn := make([]int64, len(list))
	for idx, val := range list {
		rtn[idx], _ = strconv.ParseInt(val, 10, 64)
	}
	return rtn
}

func readLine() string {
	buf := make([]byte, 0, 0)
	for {
		l, p, e := sc.ReadLine()
		if e != nil {
			panic(e)
		}
		buf = append(buf, l...)
		if !p {
			break
		}
	}
	return string(buf)
}


package main

import (
	"fmt"
)

func COM(n, k int64) int64 {
	r := int64(1)
	for i := int64(0); i < k; i++ {
		r = ModMul(r, n-i)
		r = ModDiv(r, i+1)
	}

	return r
}

const (
	MOD = 1000000000 + 7
)

func ModAdd(a, b int64) int64 {
	return (a + b) % MOD
}

func ModMul(a, b int64) int64 {
	return a * b % MOD
}

func ModSub(a, b int64) int64 {
	r := (a%MOD - b%MOD) % MOD
	if r < 0 {
		r += MOD
	}
	return r
}

func ModDiv(a, b int64) int64 {
	return a % MOD * ModInv(b) % MOD
}

func ModPow(a, n int64) int64 {
	var r int64 = 1
	for n > 0 {
		if n&1 == 1 {
			r = r * a % MOD
		}
		a = a * a % MOD
		n >>= 1
	}
	return r
}

func ModInv(a int64) int64 {
	var b, u, v int64 = MOD, 1, 0
	for b > 0 {
		t := a / b
		a -= t * b
		a, b = b, a
		u -= t * v
		u, v = v, u
	}
	u %= MOD
	if u < 0 {
		u += MOD
	}
	return u
}

type Q struct {
	value int
	index int
	A, B  int
}

type QS []*Q

func (p QS) Len() int           { return len(p) }
func (p QS) Less(i, j int) bool { return p[i].value > p[j].value }
func (pq QS) Swap(i, j int) {
	pq[i], pq[j] = pq[j], pq[i]
	pq[i].index = i
	pq[j].index = j
}

func (pq *QS) Push(x interface{}) {
	n := len(*pq)
	item := x.(*Q)
	item.index = n
	*pq = append(*pq, item)
}

func (pq *QS) Pop() interface{} {
	old := *pq
	n := len(old)
	item := old[n-1]
	old[n-1] = nil  // avoid memory leak
	item.index = -1 // for safety
	*pq = old[0 : n-1]
	return item
}

func FactoredPrimeNumber(num int) map[int]int {
	m := map[int]int{}
	return factor(m, num, 2)
}

func factor(result map[int]int, num, pnum int) map[int]int {
	if pnum*pnum > num {
		if num != 1 {
			result[num] += 1
		}
		return result
	}

	if num%pnum == 0 {
		num /= pnum
		result[pnum]++
	} else {
		pnum++
	}
	return factor(result, num, pnum)
}

func GCD(a, b int64) int64 {
	if b == 0 {
		return a
	}
	return GCD(b, a%b)
}

func LCM(a, b int64) int64 {
	return a * b / GCD(a, b)
}

func main() {
	var A, B, C int
	fmt.Scanf("%d %d %d\n", &A, &B, &C)
	min := A + B
	if min > B+C {
		min = B + C
	}
	if min > C+A {
		min = C + A
	}

	fmt.Println(min)
}

func Reverse(runes []rune) []rune {
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}
	return runes
}


package main

import (
  "fmt"
)

func maxInt(a ...int) int {m := a[0]; for _, x := range a {if x > m {m = x}}; return m}
func minInt(a ...int) int {m := a[0]; for _, x := range a {if x < m {m = x}}; return m}

func sumInt(a ...int) int {s := 0; for _, v := range a {s += v}; return s}

func main() {
  t := make([]int, 3)
  for i := 0; i < 3; i++ {
    fmt.Scan(&t[i])
  }
  fmt.Println(sumInt(t...) - maxInt(t...))
}


package main

import (
  "fmt"
)

func main() {
  var p, q, r int
  fmt.Scanf("%d %d %d", &p, &q, &r)

  ans := r
  if p + q < r {
    ans = p + q
  }
  fmt.Printf("%d\n", ans)
}


package main

import (
	"fmt"
)

func main(){
	var s []int
	var a int

	for i:=0;i<3;i++{
		s = append(s,fmt.Scan(&a))
	}
	fmt.Println(s)
}


package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
	"strings"
	"unsafe"
)

func main() {
	// P, Q, R := sc.nextInt(), sc.nextInt(), sc.nextInt()
	PQR := sc.nextInts()
	minv := 101
	for i := 0; i < 3; i++ {
		for j := 0; j < 3; j++ {
			if i == j {
				continue
			}
			tmp := PQR[i] + PQR[j]
			if minv > tmp {
				minv = tmp
			}
		}
	}
	fmt.Println(minv)
}

var (
	sc scanner
)

func init() {
	sc = scanner{
		buf: make([]string, 0, 0),
		cur: 0,
		r:   bufio.NewReader(os.Stdin),
	}
}

type scanner struct {
	buf []string
	cur int
	r   *bufio.Reader
}

func (s *scanner) readln() {
	rbuf := make([]byte, 0, 0)
	for {
		line, prefix, err := s.r.ReadLine()
		if err != nil {
			panic(err)
		}
		rbuf = append(rbuf, line...)
		if prefix == false {
			break
		}
	}
	s.cur = 0
	s.buf = strings.Split(*(*string)(unsafe.Pointer(&rbuf)), " ")
}
func (s *scanner) isFull() bool {
	if s.cur == len(s.buf) {
		return true
	}
	return false
}
func (s *scanner) resetCur() {
	s.cur = 0
}
func (s *scanner) next() string {
	if s.cur == 0 {
		s.readln()
	}
	res := s.buf[s.cur]
	s.cur++
	if s.isFull() {
		s.resetCur()
	}
	return res
}
func (s *scanner) nexts() []string {
	s.readln()
	s.resetCur()
	return s.buf
}
func (s *scanner) nextInt() int {
	if s.cur == 0 {
		s.readln()
	}
	res, _ := strconv.Atoi(s.buf[s.cur])
	s.cur++
	if s.isFull() {
		s.resetCur()
	}
	return res
}
func (s *scanner) nextInts() []int {
	s.readln()
	res := make([]int, len(s.buf))
	for i := range s.buf {
		res[i], _ = strconv.Atoi(s.buf[i])
	}
	s.resetCur()
	return res
}
func (s *scanner) nextFloat() float64 {
	if s.cur == 0 {
		s.readln()
	}
	res, _ := strconv.ParseFloat(s.buf[s.cur],
		64)
	s.cur++
	if s.isFull() {
		s.resetCur()
	}
	return res
}
func (s *scanner) nextFloats() []float64 {
	s.readln()
	res := make([]float64, len(s.buf))
	for i := range s.buf {
		res[i], _ = strconv.ParseFloat(s.buf[i],
			64)
	}
	s.resetCur()
	return res
}
func digits(x int) int {
	return len(strconv.Itoa(x))
}
func powInt(x, p int) (result int) {
	result = 1
	for i := 0; i < p; i++ {
		result *= x
	}
	return
}
func max(x, y int) int {
	return int(math.Max(float64(x), float64(y)))
}
func min(x, y int) int {
	return int(math.Min(float64(x), float64(y)))
}
func abs(x int) int {
	return int(math.Abs(float64(x)))
}
func varDump(value ...interface{}) {
	for _, v := range value {
		fmt.Fprintf(os.Stderr, "%#v\n", v)
	}
}
func yes() {
	fmt.Println("Yes")
}
func no() {
	fmt.Println("No")
}

// Pair a
type Pair struct {
	first  int
	second int
}

// Queue a
type Queue struct {
	v []Pair
}

// Push for queue
func (q *Queue) Push(v Pair) {
	q.v = append(q.v, v)
}

// Pop for queue
func (q *Queue) Pop() Pair {
	r := q.v[0]
	q.v = q.v[1:]
	return r
}

// Front for queue
func (q Queue) Front() Pair {
	return q.v[0]
}

// Empty return true if empty
func (q Queue) Empty() bool {
	return len(q.v) == 0
}


m=gets.split.map(&:to_i)
n= m.combination(2).to_a
r=[]
for i in 0..n.length-1
    r<<n[i].inject(&:+);
end

p r.min


a, b, c = gets.split(" ").map(&:to_i)
puts [a+b, a+c, b+a, b+c, c+a, c+b].min


ports = gets.split("\s").map(&:to_i)
p ports.inject(:+) - ports.max


s=gets.split("").map &:to_i
s.sort!
puts s[0]+s[1]


s=gets.split("").map &:to_i
s.sort!
puts s[0]*s[1]


p, q, r = gets.split.map &:to_i
p [p+q, q+r, r+p].min


fn main() {
    let pqr = read_vec::<usize>();

    let mut mi = usize::max_value();
    for i in 0..2 {
        for j in i+1..3 {
            let sum = pqr[i] + pqr[j];
            if mi > sum {
                mi = sum;
            }
        }
    }
    println!("{}", mi);
}

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().split_whitespace().map(|e| e.parse().ok().unwrap()).collect()
}


#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

#[allow(unused_macros)]
macro_rules! debug {
    ($($a:expr),*) => {
        eprintln!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
    }
}

use std::cmp;
use std::iter::Iterator;

fn main() {
    input! {
        a:usize,
        b:usize,
        c:usize,
    }

    let mut vec = Vec::new();

    vec.push(a+b);
    vec.push(a+c);
    vec.push(b+c);

    let min = vec.iter().min().unwrap();

    println!("{}", min);

}


#[allow(unused_imports)]
use std::char::*;
#[allow(unused_imports)]
use std::cmp::*;
use std::io::*;
use std::str::FromStr;
#[allow(unused_imports)]
use std::collections::*;

#[allow(unused_macros)]
macro_rules! debug {
    ($($a:expr),*) => {
        eprintln!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
    }
}

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

#[derive(PartialEq, PartialOrd)]
pub struct Total<T>(pub T);

impl<T: PartialEq> Eq for Total<T> {}

impl<T: PartialOrd> Ord for Total<T> {
    fn cmp(&self, other: &Total<T>) -> std::cmp::Ordering {
        self.0.partial_cmp(&other.0).unwrap()
    }
}

//const MAX:usize = 100006;
//const INF:u64 = u64::max_value();

fn main() {
    let a:Vec<u32> = (0..3).map(|_| read()).collect();

    println!("{}", min(a[0]+a[1], min(a[1]+a[2],a[0]+a[2])));

}